home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / Installer / InstaCompOne 1.0 / InstaCompOne 1.0 Guide / InstaCompOne 1.0 Guide
Encoding:
Text File  |  1994-09-07  |  142.5 KB  |  374 lines  |  [ONLN/HLX2]

  1. File and Resource Compression for the Apple Installer
  2. Overview
  3. Overview    4
  4. Features    4
  5. SDK Contents    5
  6. Example Script    5
  7. Compressing the source file and fonts    5
  8. Writing the Installer script    6
  9. Finishing with ScriptCheck    9
  10. Using ScriptCheck with InstaCompOne Archives    9
  11. InstaCompOne MPW Tool
  12. About InstaCompOneTool    10
  13. Using the InstaCompOneTool with File Archives    10
  14. Command Line    10
  15. Tool Options for File Archives    11
  16. Compressing Files    11
  17. Viewing a File Archive    12
  18. Removing Files from a File Archive    12
  19. Decompressing Files    13
  20. Using the InstaCompOneTool with Resource Archives    13
  21. Command Line    13
  22. Tool Options for Resource Archives    13
  23. Compressing Resources    14
  24. Viewing a Resource Archive    14
  25. Removing Resources from a Resource Archive    15
  26. Decompressing Resources    15
  27. Compressing Font Resources    15
  28. InstaCompOne Atom Extender
  29. Using the InstaCompOne Atom Extender    17
  30. Adding the InstaCompOne Atom Extender to your Installer Script    17
  31. How the Atom Extender Locates Data Inside the Archive    17
  32. Debugging Decompression Problems    18
  33. InstaCompOne ScriptCheck Extension
  34. Using the InstaCompOne ScriptCheck Extension    19
  35. FileAndRsrcSplitterTool
  36. About the FileAndRsrcSplitterTool    20
  37. Using the FileAndRsrcSplitterTool with Files    20
  38. Command Line    20
  39. Tool Options for Splitting Files    20
  40. Splitting Files    21
  41. Compressing Split Files    22
  42. Using the FileAndRsrcSplitterTool with Resources    22
  43. Command Line    22
  44. Tool Options for Splitting Resources    22
  45. Splitting Resources    23
  46. Compressing Split Resources    23
  47. Joining Split and Compressed Files and Resources    24
  48. Splitting Strategies    24
  49.  
  50. Overview
  51. This chapter provides an overview of the InstaCompOne suite of tools used for adding compression/decompression support to Installer 4.0 scripts.
  52. Overview
  53. The InstaCompOne SDK allows developers writing scripts for Apple’s Installer 4.0 application to split and compress their source files, fonts and resources, then have them transparently decompressed and joined during the installation.
  54. This document assumes you are familiar with MPW (Macintosh Programmers Workshop) and have experience writing Installer 4.0 scripts.  See the document “Installer 4.0 Technical Guide” for detailed information on writing scripts for Installer 4.0.
  55. Features
  56. The InstaCompOne Installer 4.0 Compression Kit includes the following features:
  57. n    Competitive compression savings.  Average savings range from 40% to 60%.
  58. n    Decompression is fast and transparent to the user.  Decompression is performed entirely in memory while the data is read from the source file, freeing the user from any wait at the end of the installation.
  59. n    Fonts and other resources can be easily compressed.  This allows for additional savings with very low scripting overhead.  In many cases it only takes an additional reference to the InstaCompOne Atom Extender (ID 241) from a Resource or Font Atom to enable decompression. 
  60. n    Compresses multiple files and resources into a single archive.  This saves disk space, while enabling the scriptwriter to reduce the source files to one file per installation disk.
  61. n    Split files, fonts, and resources before compression.  This allows efficient use of space within the installation disk set, reducing the need for adding additional installation disks simply because a compressed file would not fit completely onto the remaining space on an installation disk. This feature also allows files that are too large to be compressed onto a single installation disk to be included in the installation.
  62. SDK Contents
  63. This SDK contains all the necessary files and resources you’ll need to compress files and resources and create an Installer script that automatically decompresses your data during installation.
  64. n    InstaCompOne 1.0 Technical Guide - A guide for creating Installer scripts that use the InstaCompOne compression.  (DocViewer)
  65. n    InstaCompOneTool- A MPW tool for compressing, decompressing and managing your archive file.
  66. n    FileAndRsrcSplitterTool - A MPW tool for splitting files, fonts, and resources before compressing these items into archives.
  67. n    InstaCompOneAtomExt.rsrc - A file containing resources to include in your Installer script.
  68. n    InstaCompOneSCExt.rsrc - A file containing resources to include in your ScriptCheck extension file.
  69. n    Examples -  Each example contains everything needed to build the example installer script. Our examples use a makefile to perform all compression and splitting, to rez the installer script source file, and to run ScriptCheck on the example script. 
  70. InstaCompOneExample - This example is described in the next section in detail. It demonstrates the installation of a file, and installation of a font, using the InstaCompOne compression.
  71. File Example - This example demonstrates the installation of a file by use of file compression and file splitting.
  72. Resource Example - This example demonstrates the installation of a resource by use of resource compression and resource splitting.
  73. Font Example - This example demonstrates the installation of a font by use of resource compression and resource splitting.
  74. Example Script
  75. This example describes the process of creating a very simple Installer document that installs and decompresses one application file (SimpleText) and a family of fonts (Helvetica).  All necessary files required to create a working version of this script are available in the folder “InstaCompOneExample” in the InstaCompOne SDK.  The process of building a working Installer script requires three mains tasks:  compressing source files and fonts using the InstaCompOne MPW tool, creating and compiling the script file using the Rez MPW tool, and running the ScriptCheck MPW tool on the Installer document.
  76. The commands shown in the discussion below are executed automatically by the Build command.  These build commands can be seen in the file “Makefile”.  Refer to Macintosh Programmers Workshop 3.0 Reference for more information about using the MPW Shell application and the Rez tool. 
  77. Compressing the source file and fonts
  78. Apple’s SimpleText application is used in this example.  Assuming the current directory is set to the example folder, we compress the SimpleText application into an InstaCompOne file archive with the command:
  79. InstaCompOneTool SimpleText -o ":Tidbits:Installation Data"
  80. After the compression has finished, listing the contents of the archive shows the SimpleText application as its only contents.
  81. InstaCompOneTool SimpleText -o ":Tidbits:Installation Data" -l
  82. ID  File Name                       Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd
  83. ———————————————————————————————————————————————————————————————————————————————————————————
  84.   3 SimpleText                      APPL  ttxt        0        0   0    76168    33924  56
  85. Notice that there is nothing in the data fork, and therefore is zero.
  86.  
  87. Next, we must compress our font resources.  Each of the eight font resources will be compressed separately and stored as individual items within an InstaCompOne resource archive.  
  88. We compress the eight font resources with the commands:
  89. InstaCompOneTool Helvetica -k sfnt=16033 -a part=200 -o ":Tidbits:Installation Data"
  90. InstaCompOneTool Helvetica -k sfnt=5336 -a part=201 -o ":Tidbits:Installation Data"
  91. InstaCompOneTool Helvetica -k NFNT=24110 -a part=202 -o ":Tidbits:Installation Data"
  92. InstaCompOneTool Helvetica -k NFNT=22271 -a part=203 -o ":Tidbits:Installation Data"
  93. InstaCompOneTool Helvetica -k NFNT=14739 -a part=204 -o ":Tidbits:Installation Data"
  94. InstaCompOneTool Helvetica -k NFNT=15203 -a part=205 -o ":Tidbits:Installation Data"
  95. InstaCompOneTool Helvetica -k NFNT=17245 -a part=206 -o ":Tidbits:Installation Data"
  96. InstaCompOneTool Helvetica -k NFNT=17892 -a part=207 -o ":Tidbits:Installation Data"
  97. After each font resource has been compressed into its resource archive, we can list the contents of several of these archives. 
  98. InstaCompOneTool Helvetica -k sfnt=16033 -a part=200 -o ":Tidbits:Installation Data" -l
  99.     Type     ID  Name                            Org Size Cmp Size Svd 
  100. ——————————————————————————————————————————————————————————————————————
  101.   3 sfnt   16033 Helvetica                          52812    39290  26
  102. InstaCompOneTool Helvetica -k NFNT=24110 -a part=202 -o ":Tidbits:Installation Data" -l
  103.     Type     ID  Name                            Org Size Cmp Size Svd 
  104. ——————————————————————————————————————————————————————————————————————
  105.   3 NFNT   24110                                     2694     1746  36
  106. Finally, we add the ‘FOND’ resource to the source file.  It’s best to convert the resource to the type ‘iFND’, then use the encodedFONDRsrc flag in the Font Atom to signal to the Installer that the source ‘FOND’ has been encoded.  We use the following command to encode and copy the ‘FOND’ resource from the file “Helvetica” into the source file “Installation Data”:
  107. FONDEncoderTool Helvetica -o ":Tidbits:Installation Data"
  108. Now we’re ready to begin writing the Installer script.
  109. Writing the Installer script
  110. We begin writing our Installer script by including the InstaCompOne Atom Extender resource by adding the line include "InstaCompOneAtomExt.rsrc" NOT 'vers'; somewhere in our script file.  The script resources are created normally with the following important points:
  111. n    We must use format 1 versions or higher of the File Atom (‘infa’) and Font Atom (‘inff’) resources because these versions allow us to specify the Atom Extender ID number.  The number 241 tells Installer 4.0 to look for the Atom Extender resource (‘inex’) with this ID.
  112. n    Size, Finder attributes, and resource attribute fields are left as zero.  The ScriptCheck MPW tool will fill these fields in later.
  113. n    When decompressing font resources, we must provide the Installer with the source resource type and ID.  This requires us to specify each strike (size and style) individually. InstaCompOne compressed resources should always use the resource type ‘part’. The resource ID ( or part number ) can be any number between 128 and 32000, and should be a unique part number assigned by the scriptwriter.
  114. The Installer script Rez file “InstaCompOneExample.r” is shown below in its entirety. Please note that, for sake of simplicity in demonstrating compression, this example uses old style ( pre-4.0 installer ) method for creating Custom Install packages. This example is not intended as an example of how to take advantage of 4.0 Installer interface features.
  115. #include "InstallerTypes.r"
  116. include "InstaCompOneAtomExt.rsrc" NOT 'vers';
  117. /*************************** Package resources **********************************/
  118. resource 'inpk' (20037) {
  119.     format0 {
  120.         showsOnCustom,    notRemovable, dontForceRestart, 0, 0,
  121.         "SimpleText File Decompession Example",
  122.         { 'infa', 1001 }
  123.     }
  124. };
  125. resource 'inpk' (20038) {
  126.     format0 {
  127.         showsOnCustom, notRemovable, dontForceRestart, 0, 0,
  128.         "Helvetica Font Decompession Example",
  129.         { 'inff', 1001 }
  130.     }
  131. };
  132. /*************************** SimpleText File Atom ******************************/
  133. resource 'infa' (1001) {
  134.     format1 {
  135.         deleteWhenRemoving, deleteWhenInstalling, copy, dontIgnoreLockedFile,
  136.         dontSetFileLocked, useVersProcToCompare, srcNeedExist, rsrcForkInDataFork,
  137.         leaveAloneIfNewer, updateExisting, copyIfNewOrUpdate, rsrcFork, dataFork,
  138.         0,                    /* Total size will be filled in by ScriptCheck */
  139.         0,                    /* Finder attributes will be filled in by ScriptCheck */
  140.         10000,
  141.         {    20000, 0, 0 },    /* sizes will be filled in by ScriptCheck */
  142.         0x0,
  143.         0,
  144.         241,
  145.         ""
  146.     }
  147. };
  148. /*********************** Example Helvetica Font Atom ****************************/
  149. resource 'inff' (1001) {
  150.     format2 {
  151.         deleteWhenRemoving, deleteWhenInstalling, copy, encodedFONDRsrc, noTgtRequired,
  152.         updateExisting, copyIfNewOrUpdate, dontIgnoreProtection, srcNeedExist,
  153.         byID, nameNeedNotMatch,
  154.         10002,        /* Target */
  155.         20000,        /* Source */
  156.         32,            /* FOND Attributes */
  157.         0,            /* Total font size, filled in by ScriptCheck */
  158.         21,            /* FOND ID */
  159.         explicitFamilyMembers {{
  160.              0, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, noBoldStyle, 'sfnt', 32,
  161.                 { 20000, 'part', 200, 0, "" },
  162.              0, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, boldStyle,     'sfnt', 32,
  163.                 { 20000, 'part', 201, 0, "" },
  164.              9, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,
  165.                 { 20000, 'part', 202, 0, "" },
  166.             10, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,
  167.                 { 20000, 'part', 203, 0, "" },
  168.             12, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,
  169.                 { 20000, 'part', 204, 0, "" },
  170.             14, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,
  171.                 { 20000, 'part', 205, 0, "" },
  172.             18, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,
  173.                 { 20000, 'part', 206, 0, "" },
  174.             24, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle,                 noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,
  175.                 { 20000, 'part', 207, 0, "" }
  176.         }},
  177.         241,
  178.         "",
  179.         "Helvetica"
  180.     }
  181. };
  182. /********************** SimpleText Target File Spec. ****************************/
  183. resource 'intf' (10000) {
  184.     format0 {
  185.         noSearchForFile, typeCrNeedNotMatch, 'APPL', 'ttxt', 0,
  186.         "folder-user:SimpleText"
  187.     }
  188. };
  189. /********************* Font Suitcase Target File Spec. **************************/
  190. resource 'intf' (10002) {
  191.     format0 {
  192.         noSearchForFile, typeCrNeedNotMatch, 'FFIL', 'DMOV', 0,
  193.         "folder-user:Example Fonts"
  194.     }
  195. };
  196. /************************* Archive Source File Spec. ****************************/
  197. resource 'infs' (20000) {
  198.     'ircp', 'kakc', 0x1, noSearchForFile, TypeCrMustMatch,
  199.     "Tidbits:Installation Data"
  200. };
  201. /************************** Preference Resource *********************************/
  202. resource 'inpr' (300) {
  203.     format0 {
  204.         useFolderTargetMode, dontAllowUserToSetSystemDisk, showSelectedSizeInCustom,
  205.         noSetupFunctionSupplied, dontAllowCleanInstall, dontAllowServerAsTarget,0,0,
  206.             {    301, 311, 301, 311, 302, 312, 302, 312 },
  207.         "Example Folder"
  208.     }
  209. };
  210. We compile the Rez code using the Rez MPW tool by executing the following command
  211. Rez InstaCompOneExample.r -o InstaCompOneExample -t 'kajr' -c 'kajr'
  212. After compiling the Rez code with the Rez MPW tool, we will have an Installer document, but it still needs to have the file and resource information updated.
  213. Finishing with ScriptCheck
  214. The ScriptCheck MPW tool performs two important actions on your script:
  215. n    Checks for syntax errors, such as referencing a script resource that is not present in the Installer document.  The ScriptCheck tool also verifies that all source files and resources exist on the source disks.
  216. n    Fills in the size, Finder attributes, and resource attribute fields we left as zero when we wrote the script.  The ScriptCheck MPW tool gets this information by asking the code contained in the ScriptCheck extension file.
  217. To begin the checking process we execute the command:
  218. ScriptCheck 'InstaCompOneExample' -h -d -a
  219. The ScriptCheck MPW tool is described in detail in the document “ScriptCheck 4.0 Guide”.  
  220. Using ScriptCheck with InstaCompOne Archives
  221. To assist ScriptCheck in determining file and resource information of items contained within InstaCompOne archives, an extension file has been provided for ScriptCheck. This file enables ScriptCheck to determine size and attribute information about the original item contained within an InstaCompOne archive.
  222. The file “InstaCompOneSCExt.rsrc” contains code that can retrieve the required information from the archive to enable ScriptCheck to correctly update the Installer document.  This file is included in the InstaCompOne SDK.  
  223. To enable ScriptCheck for use with InstaCompOne archives :
  224. n    Place a copy of the file “InstaCompOneSCExt.rsrc” in the same folder as your Installer script source file ( myInstallScript.r, etc. ).
  225. n    Rename the file so that it has the same name as the install script source but uses the filename extension of “.scx”.  Example : “myInstallScript.scx”
  226. When running ScriptCheck to build the installer for InstaCompOneExample, ScriptCheck looks for a file named “InstaCompOneExample.scx” which was created in our automated build process. 
  227.  
  228. InstaCompOne MPW Tool
  229. This chapter describes the InstaCompOne MPW Tool.
  230. About InstaCompOneTool
  231. You’ll use the InstaCompOne MPW Tool named “InstaCompOneTool” to compress your files and resources into an archive.  The InstaCompOne MPW Tool also allows you to list, remove and decompress files or resources contained in the archive.
  232. The actual compressed data is stored differently depending on whether you are compressing files or resources:
  233. n    For files:  the compressed data is stored in the data fork of an archive file.
  234. n    For resources and fonts:  the compressed data is stored in a archive resource usually of type 'part'.  These archive resources can be placed in any file, including an archive file that contains compressed file data in its data fork.
  235. You'll use the InstaCompOneTool to compress and manage both archived files and archived resources.  The rest of this chapter is divided in two sections:  using the InstaCompOneTool with file archives and using the InstaCompOneTool with resource archives.
  236. The InstaCompOne MPW Tool requires MPW 3.0 or newer and System 7.0 or newer.  To list the help text, invoke the tool without parameters. 
  237. Using the InstaCompOneTool with File Archives
  238. This section describes how to use InstaCompOneTool to compress and manage compressed files stored in a file archive. 
  239. Command Line
  240. Usage when compressing files in a file archive:
  241. InstaCompOneTool filename -o archiveFilename [-e] [-f name] 
  242. Usage when decompressing, listing or removing files from a file archive:
  243. InstaCompOneTool [-d|-l|-r] filename [-i ID] -o archiveFilename 
  244. Tool Options for File Archives
  245. fileName ...    When compressing, specifies one or more files to be compressed and added to the archive file.  When decompressing or removing, specifies one or more file entries in the file archive.  If more than one entry exists in the archive with the same filename, you may need to use the -i option to specify the exact entry.  The filename can be a single file name, partial path, or full path.  
  246. -o archiveFileName    Specifies a filename, partial path, or full path to a new or existing file archive.
  247. -i entryID    Specifies a compressed file entry in the archive using the file’s unique identifier, instead of the name.  This option can only be used when removing or decompressing a file entry in the archive and can be mixed with filenames.  You can use multiple -i options in one command line.
  248. -r    Requests that the specified compressed files be deleted from the file archive indicated by the -o option.  The compressed files can either be specified by filename or using the -i option.
  249. -d    Requests that the specified compressed file be decompressed to a file from the file archive specified in the -o option.  The decompressed file is placed at the location specified in the file name path.  An existing file with the same name will be replaced without warning.
  250. -l    Writes a listing of the files contained in the archive to stdout.  The -l option should only be used with the -o option.
  251. -e    Requests that the data fork being compressed from the specified source files actually be stored in the file archive as coming from the resource fork.  This option is required when compressing a resource fork that has been split using the FileAndRsrcSplitterTool, because this tool always places the split resource data into the data fork of the split files.
  252. -f newFilename    Renames the source file being compressed to that specified in newFilename.  Since the InstaCompOne Atom Extender finds the file in the file archive based partly on the target file name, this eliminates the need to rename split files using MPW or the Finder before compressing.
  253. Compressing Files
  254. You can add one or more files to a new or existing archive file by specifying the files to be compressed and the archive filename.  If the specified archive file does not exist, it will be created.  The tool will not create folders that do not exist.  If a file exists with the same name as the specified archive name, but the file is not a valid archive, an error is written to stderr. If the folders or directories specified in the path to a non-existing archive do not exist, the folders or directories will not be created, and an error is will be written to stderr.
  255. For example, to compress the files MyBigFile and “A Large File” and add them to the archive file “Compressed Data” execute the command:
  256. InstaCompOneTool  MyBigFile "Hard Disk:A Large File" -o "Compressed Data"
  257. If an entry for the file you are compressing and adding to the archive already exists, it will be replaced.  The tool uses the name, type and creator to determine if the file is the same as one already in the archive.  Each time you add or update a file in the archive a new ID is assigned to the compressed file entry.
  258. NOTE
  259. The suggested MPW Shell partition size is at least 4 Mb’s.  Compressing large files may require an even larger partition size.   u
  260. Viewing a File Archive
  261. You view the contents of a file archive using the -l option. 
  262. For example, to list the information about the compressed files in the file archive “Compressed Data” execute the command:
  263. InstaCompOneTool   -o "Compressed Data" -l
  264. The listing is written to stdout.
  265. ID  File Name               Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd
  266. ———————————————————————————————————————————————————————————————————————————————————
  267.   7 General Controls        cdev  misc        0        0   0    58658    20700  65
  268.   9 Labels                  cdev  flbs        0        0   0     2922      915  69
  269.  12 Mouse                   cdev  mous        0        0   0    18339    15015  19
  270.  20 Views                   cdev  fvew        0        0   0     2921      841  72
  271. ———————————————————————————————————————————————————————————————————————————————————
  272.             TOTALS                            0        0   0    82840    37471  45
  273. Removing Files from a File Archive
  274. Compressed files can easily be removed from an archive file by using the -r option.  Specify the files by listing their filenames in the command, or use the -i option to refer to a compressed file using its unique identifier.  This may be necessary when several compressed files have the same name, otherwise the first file found in the archive matching the name will be removed.
  275. For example, let’s assume we start with the archive:
  276. ID  File Name               Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd
  277. ———————————————————————————————————————————————————————————————————————————————————
  278.   1 LaserWriter             PRER  LWRW        0        0   0   268960   169589  37
  279.   2 LaserWriter 300         PRER  LWL2        0        0   0   318151   144917  55
  280.   3 LW Select 310           PRES  lwsl        0        0   0   268973   171945  37
  281.   4 Personal LaserWriter SC PRER  LWSC        0        0   0    72716    37332  49
  282.   5 StyleWriter II          PRER  IJR2        0        0   0   301358   137184  55
  283.   6 LaserWriter             TEXT  ????    11311     3793  67      571      336  42
  284.   7 LaserWriter II NT       TEXT  ????    11830     3600  70      571      346  40
  285.   8 LaserWriter II NTX      TEXT  ????    11957     3679  70      571      346  40
  286.   9 LaserWriter Pro 810f    TEXT  ????    29434     6207  79      571      414  28
  287.  10 LaserWriter Select 360  TEXT  ????    20738     5269  75      573      396  31
  288. ———————————————————————————————————————————————————————————————————————————————————
  289.             TOTALS                        85270    22548  74  1233015   662805  47
  290. To remove the StyleWriter II and LaserWriter files from the archive we execute the command:
  291. InstaCompOneTool  "StyleWriter II" -i 6  -o "Compressed Data" -r
  292. Since the name LaserWriter shows twice, we used the option -i 6 to specify the exact entry we wish to delete.
  293. After the remove operation is complete we have the archive:
  294. ID  File Name               Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd
  295. ———————————————————————————————————————————————————————————————————————————————————
  296.   1 LaserWriter             PRER  LWRW        0        0   0   268960   169589  37
  297.   2 LaserWriter 300         PRER  LWL2        0        0   0   318151   144917  55
  298.   3 LW Select 310           PRES  lwsl        0        0   0   268973   171945  37
  299.   4 Personal LaserWriter SC PRER  LWSC        0        0   0    72716    37332  49
  300.   7 LaserWriter II NT       TEXT  ????    11830     3600  70      571      346  40
  301.   8 LaserWriter II NTX      TEXT  ????    11957     3679  70      571      346  40
  302.   9 LaserWriter Pro 810f    TEXT  ????    29434     6207  79      571      414  28
  303.  10 LaserWriter Select 360  TEXT  ????    20738     5269  75      573      396  31
  304. ———————————————————————————————————————————————————————————————————————————————————
  305.             TOTALS                        73959    18755  75   931086   525285  44
  306. Decompressing Files
  307. You’ll normally use the Atom Extender that you've included in your Installer script to perform the decompression during the installation, but the tool can also be used to decompress any file contained in a file archive. 
  308. To decompress a file, use the -d option and specify one or more filenames or file entries using the -i option.  Files that are decompressed remain in the archive.
  309. If you do not specify a file to be decompressed, all files will be decompressed.  The tool places the decompressed files into the current directory and will replace any file with the same name without notification.  
  310. For example, to decompress the files MyBigFile and “A Large File” from the archive file “Compressed Data” execute the command:
  311. InstaCompOneTool  MyBigFile "Hard Disk:A Large File" -o "Compressed Data" -d
  312. Using the InstaCompOneTool with Resource Archives
  313. This section describes how to use the InstaCompOneTool to compress and manage compressed resource data stored in a resource archive. 
  314. Command Line
  315. Usage when compressing and adding or replacing a resource in a resource archive:
  316. InstaCompOneTool filename -o archiveFilename -k restype=ID -a restype=ID
  317. Usage when decompressing, listing or removing a resource from a resource archive:
  318. InstaCompOneTool [-d|-l|-r] filename -o archiveFilename [-i ID] [-k restype=ID] -a restype=ID 
  319. Tool Options for Resource Archives
  320. fileName    When compressing, specifies the file that contains the resources to be compressed, or when decompressing, the file that the original resources will be placed.  The filename can be a single file name, partial path, or full path.  
  321. -k restype=ID    Specifies the type and ID of a resource to be compressed, decompressed or removed.  For example, if the resource has the type 'sfnt' and the ID 5302, then the parameter should be formatted:  -k sfnt=5302. 
  322. -o archiveFileName    Specifies a filename, partial path, or full path to a new or existing file that contains the archive resource.
  323. -a restype=ID    Specifies the type and ID of the archive resource.
  324. -i entryID    Specifies a compressed resource in the archive using the entry’s unique identifier, instead of the resource type and ID.  This option can only be used when removing or decompressing a compressed resource entry in the archive resource.
  325. -r    Requests that the specified compressed resources be deleted from the archive identified by the -o and -a options.  Specify the resources to be removed by using the -k or -i option.
  326. -d    Requests that the specified compressed resources be decompressed to a file.  The decompressed resources are placed in the filename found in the command.  An existing resource with the same type and ID will be replaced without warning.
  327. -l    Writes a listing of the resources contained in the resource archive to stdout.
  328. Compressing Resources
  329. Compressing resources into a resource archive is similar to compressing files, except the archive is actually contained in a resource you choose.  You’ll need to specify the archive resource type and ID using the -a option.  You must also specify the name of the file that contains, or will contain this resource using the -o option.
  330. Multiple resources (except font resources) can be placed into one resource archive, and will be found automatically by the Atom Extender and decompressed during installation.  Both the MPW Tool and the Atom Extender use the original type and ID to find the resource data in the archive.
  331. For example, to compress the resource (type ‘fred’ and ID 128) found in the file “FredRsrcs” and place it into an archive resource of type ‘part’ and ID 300 in the file “Compressed Fred Data” execute the command:
  332. InstaCompOneTool  FredRsrcs -k fred=128 -a part=300 -o "Compressed Fred Data"
  333. Each time you add or update a resource in the archive a new ID is assigned to the compressed resource entry.
  334. Viewing a Resource Archive
  335. You can view the compressed resources currently contained in resource archive using the -l option. 
  336. To list information about the compressed resource in the archive resource (type ‘part’ and ID 200 ) in the file “Compressed Data” execute the command:
  337. InstaCompOneTool  -a part=200 -o "Compressed Data" -l
  338. The listing is written to stdout. 
  339.     Type     ID  Name                            Org Size Cmp Size Svd 
  340. ——————————————————————————————————————————————————————————————————————
  341.   1 sfnt    5336 Helvetica Bold                     51624    38356  26
  342. Removing Resources from a Resource Archive
  343. To remove a resource entry from an archive specify these four options in the command:
  344. n    -r option, to signify that this is a remove operation
  345. n    -o option with the filename of the file containing the resource archive
  346. n    -a option with the resource archive type and ID
  347. n    -k option with the original, uncompressed resource type and ID to remove
  348. For example, to remove the resource ‘fred’ ID 245 from the resource archive ‘part’ ID 128 in the file “Compressed Resources” execute the command:
  349. InstaCompOneTool  "Hard Disk:My Resources" -k fred=245 -a part=128 -o "Compressed Resources" -r
  350. Decompressing Resources
  351. To decompress a resource specify these five options in the command:
  352. n    -d option, to signify that this is a decompression operation
  353. n    -o option with the filename of the file containing the resource archive
  354. n    -a option with the resource archive type and ID
  355. n    -k option with the original, uncompressed resource type and ID to decompress
  356. n    -filename or pathname of the file in which the original resource will be placed
  357. For example, to decompress the resource ‘fred’ ID 245 to the file “My Resources” on the disk “Hard Disk” from the resource archive ‘part’ ID 128 in the file “Compressed Resources” execute the command:
  358. InstaCompOneTool  "Hard Disk:My Resources" -k fred=245 -a part=128 -o "Compressed Resources" -d
  359. Compressing Font Resources
  360. Compressing font resources is very similar to compressing any other resource, except several limitations must be kept in mind.  There are four common font resource types:  ‘FOND’, ‘FONT’, ‘NFNT’ and ‘sfnt’.  The ‘FOND’ resource describes how the other types relate, and the ‘FONT’ is an older type that is rarely used today.  Therefore, the most common font resources you will compress will either be of type ‘NFNT’ or ‘sfnt’.
  361. NOTE
  362. Keep these important notes in mind when compressing font resources:
  363. n    Multiple font resources cannot be placed into a single resource archive ; therefore, one resource archive must be created for each original font resource.  Although, any number of resource archives can be placed into a single source file, even into a file that contains a file archive in its data fork
  364. n    The ‘FOND’ resource should never be compressed or split.  It’s also best to encode the ‘FOND’ resource as type ‘iFND’ whenever it’s ‘NFNT’, ‘sfnt’ or ‘FONT’ resource are compressed.  An example of this encoding is described below.  u
  365. For example, to compress the resource (type ‘sfnt’ and ID 5336) found in the file “Helvetica” and place it into an archive resource of type ‘part’ and ID 200 in the file “Compressed Data” execute the command:
  366. InstaCompOneTool  Helvetica -k sfnt=5336 -a part=200 -o "Compressed Data"
  367. The Installer will be expect to the ‘FOND’ resource located in the file you have specified in your ‘inff’ script resource.  You can use the FONDEncoderTool or Rez commands to encode and copy the ‘FOND’ resources.  To encode the ‘FOND’ resource and store it in the file “Compressed Data” execute the command:
  368. FONDEncoderTool Helvetica -o "Compressed Data"
  369. or
  370. echo "include Helvetica 'FOND' AS 'iFND';" | Rez -o "Compressed Data" -append
  371. The ‘FOND’ resource will be stored as a resource of type ‘iFND’ with the identical resource ID as the original ‘FOND’ resource.
  372. NOTE
  373. The ‘FOND’ encoding is only a feature of format version 2 of the Font Atom.  Make sure to use the encodedFONDRsrc flag to signal to the Installer that the source ‘FOND’ has been encoded.  u
  374.  
  375. InstaCompOne Atom Extender
  376. This chapter describes the InstaCompOne Atom Extender.
  377. Using the InstaCompOne Atom Extender
  378. The InstaCompOne Atom Extender is two resources you add to your Installer script file that will be called at the appropriate time to decompress ( and optionally to join split pieces of ) a File, Resource or Font Atom’s data during the installation.  This Atom Extender can only be used with archives created using the InstaCompOne MPW Tool.
  379. Adding the InstaCompOne Atom Extender to your Installer Script
  380. The InstaCompOne Atom Extender resources are contained in the file “InstaCompOneAtomExt.rsrc”.  You’ll need to place these resources into your Installer script file so the Installer can find it.  If you are using MPW to create your Installer script, simply include the following line in your Installer script Rez file (“.r” file):
  381. include "InstaCompOneAtomExt.rsrc" NOT 'vers';
  382. For those File, Resource and Font Atoms that are copying data contained in an InstaCompOne archive, place the number 241 in the Atom Extender ID field of the atom resource.  This field is only available in format 1 or higher versions of the ‘infa’ , ‘inra’ and ‘inff’ script resources.
  383. NOTE
  384. For File Atoms, you’ll need to use the rsrcForkInDataFork flag to enable the Atom Extender to access the archive correctly when copying the resource fork of a compressed file.   u
  385. How the Atom Extender Locates Data Inside the Archive
  386. The InstaCompOne Atom Extender uses different criteria to locate a file or resource in the archive than does the InstaCompOne MPW tool. 
  387. The Atom Extender uses the following strategy for find the correct data in the archive:
  388. n    For files, the Atom Extender uses only the filename and the original, uncompressed size of the data.  The filename will be extracted from the target path in the 'intf' target spec resource for the file atom ( 'infa' ). 
  389. n    For font resources, only the target type of the resource is used.  This limitation prevents multiple compressed font resources from being stored in a single resource archive.
  390. n    For non-font resources, both the target type and target ID are used to find the entry inside the resource archive.
  391. Most of the time you’ll never have to worry about how the data is found in the archive, because it just works!
  392. NOTE
  393. You may notice some degradation of decompression speed from floppy disks if a single archive contains more than 30 files.  This will be addressed in a future version of the InstaCompOne Atom Extender.   u
  394. Debugging Decompression Problems
  395. If something goes wrong during decompression, the Installer will cancel the installation with a generic error message.  During your testing cycle, it’s easiest to determine the actual problem using the Installer Debugger supplied with the Installer 4.0 SDK.  The InstaCompOne Atom Extender will write any error information to the Installer Debugger main window. 
  396. InstaCompOne Atom Extender error codes:
  397. Error# 28201    The file archive or resource archive may be corrupted or is not a valid archive.  The Atom Extender looks for a signature in the header of the archive, and if not found returns this error. If the signature is correct but the checksum of the header and catalog is incorrect the archive is assumed corrupted and this error is generated.        
  398. Error# 28202    The compressed file or resource was not found in the catalog of the archive.  This is most often because the compressed file’s filename is incorrect in the archive when using with a File Atom.  See the above section “How the Atom Extender Locates Data Inside the Archive” for information about our catalog lookup strategy.
  399. Error# 28203    The checksum of the data that has been read does not match the value stored in the archive.  The archive may be corrupted.            
  400. Error# 28204    This version of the InstaCompOne Atom Extender does not support the archive version.  This might be the case if you are using an older Atom Extender with an archive created with a newer version of the compressor tool.    
  401.  
  402. InstaCompOne ScriptCheck Extension
  403. This chapter describes the InstaCompOne ScriptCheck Extension.
  404. In order to have ScriptCheck compute the correct target size values and fill in the appropriate Finder flags and version number for a compressed file, ScriptCheck must know how to extract this information from the archive file.  
  405. Using the InstaCompOne ScriptCheck Extension
  406. To enable ScriptCheck for use with InstaCompOne archives :
  407. n    Place a copy of the file “InstaCompOneSCExt.rsrc” in the same folder as your installer script source ( myInstallScript.r, etc. ).
  408. n    Rename the file so that it has the same name as the install script source but uses the filename extension of “.scx”.  Example : “myInstallScript.scx”
  409. NOTE
  410. You must use version 4.0.1 or newer of the ScriptCheck tool when using the InstaCompOne ScriptCheck Extension.   u
  411. When checking a File, Resource or Font Atom which references an Atom Extender, ScriptCheck looks for a file named “yourScriptFileName.scx”, where yourScriptFileName is the same as the Installer Script file name you are checking.  To create the ScriptCheck Extension for the InstaCompOne compressor, just rename the file “InstaCompOneSCExt.rsrc” to “yourScriptFileName.scx”.  Place this file in the same directory as the Installer script you are checking.
  412. See the document “ScriptCheck 4.0 Guide” for the gory details of how ScriptCheck extensions work.
  413. See the section “InstaCompOne Atom Extender” in this document for a listing of the possible error code returned from the InstaCompOne ScriptCheck extension.
  414.  
  415. FileAndRsrcSplitterTool
  416. This chapter describes the FileAndRsrcSplitterTool.
  417. About the FileAndRsrcSplitterTool
  418. You’ll use the MPW Tool named “FileAndRsrcSplitterTool” to split large files and resources to enable floppy disk sets to be created, or to optimize the disk space usage.  Additional disk space savings are possible when the split pieces are compressed using the InstaCompOne compression tools.
  419. The FileAndRsrcSplitterTool can split either files or individual resources.  The rest of the this chapter is divided between it use with files and its use with resources.
  420. NOTE
  421. The FileAndRsrcSplitter MPW Tool requires MPW 3.0 or newer and System 7.0 or newer.  To list the help text, invoke the tool without parameters.   u
  422. Using the FileAndRsrcSplitterTool with Files
  423. This section describes how to split files for use with Installer 4.X.  File Atom format version 1 or higher supports multiple spilt sources.  Refer to the Installer 4.X Technical Guide for additional information concerning installation of split files.
  424. Command Line
  425. FileAndRsrcSplitterTool filename… -s sizeInBytes [-o outputFilename]
  426. Tool Options for Splitting Files
  427. fileName ...    Specifies one or more files to be split.  The filename can be a single file name, partial path, or full path.
  428.     NOTE
  429. If specifying multiple source files to be split, do not use the -o option.  This will allow the source filename to be used as the root name of the split files.   u
  430. -s sizeInBytes    Specifies in bytes the maximum size desired for each resulting piece of the file or files to be split.
  431. -o outputFilename    Specifies the root name and the location of the created split files.  The filename can be a single file name, partial path, or full path.
  432.     NOTE
  433. If specifying multiple source files to be split, do not use the -o option.  This will allow the source filename to be used as the root name of the split files.   u
  434.     The split file names are created by appending the appropriate suffix to the root filename along with the split number.  If a resource fork is present in the source file, split files will be created with the suffix “.rsrc1”, “.rsrc2”, etc.  If a data fork is present in the source file, split files will be created with the suffix “.data1”, “.data2”, etc.  For example, if the specified output filename was “splitText” and the original file was split into four pieces, the filenames of the resulting files might be “splitText.rsrc1”, “splitText.rsrc2”,  “splitText.rsrc3” and “splitText.data1”.
  435. Splitting Files
  436. You can split one or more files into separate pieces by specifying the files to be split, the maximum size in bytes for each split piece, and an optional object filename.  If an object filename is specified, resulting files containing the split pieces of the original file will have '.rsrc1', '.rsrc2', etc. appended to the specified object filename.  If no object filename is specified, resulting files will use the filename of the original file with '.rsrc1', '.rsrc2', etc. appended. 
  437. For example, to split the file "TeachText" into one or more pieces that are all smaller than 32k bytes execute the command:
  438. FileAndRsrcSplitterTool  TeachText -s 32000 -o "splitTeachText"
  439. This will generate two files named “splitTeachText.rsrc1” and “splitTeachText.rsrc2”.  If a file exists with the same name as a file generated by file splitting , it will be replaced by the generated file without warning.
  440. To instruct the Installer to join your split files into one target files during the installation you’ll need to create an entry in the File Atom’s source list for each split file.  If the original source file had both a data fork and a resource fork you’ll need to create two File Atoms, one to copy the resource fork and another one to copy the data fork.  This is necessary to allow ScriptCheck to correctly update the sizes.  Since the split resource fork will actually be stored in the data fork of the split file you’ll need to use the rsrcForkInDataFork flag in your File Atom.
  441. NOTE
  442. When splitting multiple files it is necessary to use the default object filename to avoid having each set of split files being given the same set of filenames. This is accomplished by omitting the -o option ( object filename ).   u
  443. Compressing Split Files
  444. Split files can optionally be compressed using the InstaCompOneTool then decompressed and joined automatically during installation.
  445. The InstaCompOne decompression Atom Extender treats compressed split file just like any other file, but two important points will make sure your file archive is setup properly.
  446. n    The name of the file in the file archive must be the same as the target file name as specified in the target file spec.  Since the FileAndRsrcSplitterTool creates split files with unique names, the -f option will allow you to easily compress each piece and stored with the target name.  Because InstaCompOne archives allow only one item in each archive with the same filename, type and creator, it will also be necessary to compress each split piece of a file into separate file archives.
  447. n    The InstaCompOneTool maintains information about which compressed data is from the resource fork and which is from the data fork.  Since all split file data is stored in the data fork of the split files you are compressing, you’ll need to tell the InstaCompOneTool which is actually from the resource fork.
  448. For example, to compress the split files "splitTeachText.rsrc1" and "splitTeachText.rsrc2" and add them to two archive files “Compressed Data1” and “Compressed Data2” execute the commands:
  449. InstaCompOneTool  splitTeachText.rsrc1  -o ":disk 1:Compressed Data1" -f "TeachText" -e
  450. InstaCompOneTool  splitTeachText.rsrc2  -o ":disk 2:Compressed Data2" -f "TeachText" -e
  451. If an entry for the file you are compressing and adding to the archive already exists, it will be replaced.  Be careful when compressing split pieces that you specify the intended archive correctly. Adding two split pieces of the same file to an archive will result in one of the split pieces being overwritten by the other split piece.
  452. Using the FileAndRsrcSplitterTool with Resources
  453. This section describes how to split resources for use with Installer 4.X.  Resource Atom or Font Atom format version 1 or higher supports multiple spilt sources.  Refer to the Installer 4.X Technical Guide for additional information concerning installation of split resource or fonts.
  454. Command Line
  455. FileAndRsrcSplitterTool filename -k restype=ID -s sizeInBytes -a restype=ID -o outputFilename 
  456. Tool Options for Splitting Resources 
  457. fileName     Specifies the file containing the resource to be split.  The filename can be a single file name, partial path, or full path.
  458. -k restype=ID    Specifies the resource type and ID within the specified source file to be split.
  459. -s sizeInBytes    Specifies in bytes the maximum size desired for each resulting piece of the resource to be split.
  460. -a restype=ID    Specifies the resource type and initial resource ID to be assigned to resource items created within the specified output file.
  461.     You may use any unique number between 128 and 32000 as the base ID for the resulting split resources. For example, if the target type and ID given was [ -a 'curs'=128 ] and the resource was split into three pieces, the resulting resource items placed in the specified output file would be : 'curs' (128), 'curs'(129), and 'curs'(130).
  462.     If you won’t be compressing the split resource pieces, we suggest you use the resource type ‘part’.  If you will be compressing the piece using the InstaCompOneTool, then leave the type the same as the original resource.
  463. -o outputFilename    Specify the filename of the file that will contain the split resource pieces.  The filename can be a single file name, partial path, or full path.
  464. Splitting Resources
  465. You can split a resource into separate pieces by specifying the file containing the resource item to be split, the resource type and ID of the resource to be split, the maximum size in bytes for each split piece, the object filename that will contain each split resource piece, and the resource type and base ID for each of the resulting split pieces.  
  466. For example, to split the resource of type 'STR#' ID 129 within the file "TeachText", into one or more pieces that are all smaller than 2k bytes, execute the command:
  467. FileAndRsrcSplitterTool  TeachText -k ‘STR#’=129 -s 2000 -a part=1000 -o "splitResources"
  468. This will generate two resources of type 'part' with IDs of 1000 and 1001 in the file named “splitResources”.  If a resource already exists within the specified object file with the same resource type and ID, it will be replaced without warning.
  469. To instruct the Installer to join your split resources into one target resource during the installation you’ll need to create an entry in the Resource or Font Atom’s source list for each split resource piece.
  470. Compressing Split Resources
  471. Split resources can optionally be compressed using the InstaCompOneTool then decompressed and joined automatically during installation.
  472. One important point to remember when compressing split resource pieces is that the type and ID of the resource that is compressed must be the same as the target resource type and ID specified in the Resource Atom.  Although there are several ways to accomplish this task in your script building process, our examples uses less than obvious MPW trickery to change the type and ID of the split resources before compressing them.
  473. For example, to compress the split resources created within the file “splitResources” (see previous section) and add them to two archive files “Compressed Data1” and “Compressed Data2” execute the commands:
  474. echo "include ∂"splitResources∂" 'part'(1000) AS 'STR#'(9100);" | Rez -o tempFile1
  475. InstaCompOneTool tempFile1 -k 'STR#'=9100 -a part=1000 -o "Compressed Data1"    
  476. echo "include ∂"splitResources∂" 'part'(1001) AS 'STR#'(9100);" | Rez -o tempFile2
  477. InstaCompOneTool tempFile2 -k 'STR#'=9100 -a part=1001 -o "Compressed Data2" 
  478. Joining Split and Compressed Files and Resources
  479. It is not possible using the InstaCompOneTool to decompress and join files or resources that have been split and compressed.  Only the Installer can join split files and resources.
  480. Splitting Strategies
  481. File and resource splitting is handy for reducing the disk count in install disk sets, and necessary for including files and resources that are still too large after compression to fit onto a single install disk.  Since files must be split before being compressed you may need to use trial and error to determine the right split size to obtain compressed files the optimize the disk space on your floppies.  
  482. Use the following steps to help you split and compress your files to optimize disk space usage:
  483. n    First, compress the entire file using the InstaCompOne compression tool.  Then calculate the "best guess" of how to split the file using the following formula:
  484.     MaxSplitPieceSize =  DiskSize  * ( OriginalFileSize  / CompressedFileSize )
  485. n    Run the FileAndRsrcSplitter MPW Tool on the large file, using the MaxSplitPieceSize calculated above.  Then compress each split piece using the InstaCompOne MPW Tool.
  486. n    If any of the split and compressed pieces are still too large to fit onto the install disks, then repeat the splitting process using a smaller value for the maximum size of each split file piece.
  487. We hope to eliminate this tedious process in a future version of the InstaCompOne tools.
  488. $dˇ ˇˇˇˇd
  489. _,Times
  490. .+66InstaCompOne 1.0*Technical Guide
  491. $(œ6
  492. +®
  493. (Ì6)Document Version 1.7 -  September 1, 1994
  494. °dONLNdÇ6ï√(ê65File and Resource Compression for the Apple Installerˇ3Ídˇ ˇˇˇˇd
  495. _, Palatino
  496. .+~-Table of Contents,     Helvetica
  497.     (Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )¶2
  498. °dONLNdc6uÅ(q6Overview"°∂ u4u+°∂°∂
  499. °dONLNd    v6Çd*Overview°dONLNdˇˇ)0 ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ............°dONLNdˇˇ(d °dONLNdˇˇ(
  500. 4°dONLNdÇHéo(ãHFeatures°dONLNdˇˇ)' ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`    .........°dONLNdˇˇ(ão °dONLNdˇˇ(ã
  501. 4°dONLNdéHöá(óH SDK Contents°dONLNdˇˇ)? ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.°dONLNdˇˇ(óá °dONLNdˇˇ(ó
  502. 5°dONLNd.ö6¶|(£6Example Script°dONLNdˇˇ)H ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`....°dONLNdˇˇ(£| °dONLNdˇˇ(£
  503. 5°dONLNd?¶H≤Ó(ØH%Compressing the source file and fonts°dONLNdˇˇ)® ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`..............................°dONLNdˇˇ(ØÓ °dONLNdˇˇ(Ø
  504. 5°dONLNdg≤Hæ≈(ªHWriting the Installer script°dONLNdˇˇ)~ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ............°dONLNdˇˇ(ª≈ °dONLNdˇˇ(ª
  505. 6°dONLNdÜæH »(«HFinishing with ScriptCheck°dONLNdˇˇ)Å ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ...........°dONLNdˇˇ(«» °dONLNdˇˇ(«
  506. 9°dONLNd£ H÷'(”H,Using ScriptCheck with InstaCompOne Archives°dONLNdˇˇ)· ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ...........°dONLNdˇˇ(”' °dONLNdˇˇ)„9
  507. °dONLNd“Ë6˙(ˆ6InstaCompOne MPW Tool"°∂ ˙4˙+°∂°∂
  508. °dONLNdË˚6™*About InstaCompOneTool°dONLNdˇˇ)u ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.....................°dONLNdˇˇ(™ °dONLNdˇˇ(
  509. 10°dONLNd6(6-Using the InstaCompOneTool with File Archives°dONLNdˇˇ)· ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.................°dONLNdˇˇ( °dONLNdˇˇ)ı10°dONLNd3Hã(H Command Line°dONLNdˇˇ)E ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...............................°dONLNdˇˇ(ã °dONLNdˇˇ(
  510. 10°dONLNdCH+“((HTool Options for File Archives°dONLNdˇˇ)ä ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`........°dONLNdˇˇ((“ °dONLNdˇˇ((
  511. 11°dONLNde+H7ö(4HCompressing Files°dONLNdˇˇ)T ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`..........................°dONLNdˇˇ(4ö °dONLNdˇˇ(4
  512. 11°dONLNdz7HC¥(@HViewing a File Archive°dONLNdˇˇ)l ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`..................°dONLNdˇˇ(@¥ °dONLNdˇˇ(@
  513. 12°dONLNdîCHOÍ(LH"Removing Files from a File Archive°dONLNdˇˇ)¢ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ(LÍ °dONLNdˇˇ(L
  514. 12°dONLNd∫OH[§(XHDecompressing Files°dONLNdˇˇ)] ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.......................°dONLNdˇˇ(X§ °dONLNdˇˇ(X
  515. 13°dONLNd—[6g)(d61Using the InstaCompOneTool with Resource Archives°dONLNdˇˇ)Û ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ...........°dONLNdˇˇ(d) °dONLNdˇˇ)·13°dONLNdgHsã(pH Command Line°dONLNdˇˇ)E ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...............................°dONLNdˇˇ(pã °dONLNdˇˇ(p
  516. 13°dONLNdsHÊ(|H"Tool Options for Resource Archives°dONLNdˇˇ)ü ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.°dONLNdˇˇ(|Ê °dONLNdˇˇ(|
  517. 13°dONLNd<HãÆ(àHCompressing Resources°dONLNdˇˇ)f ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`....................°dONLNdˇˇ(àÆ °dONLNdˇˇ(à
  518. 14°dONLNdUãHó»(îHViewing a Resource Archive°dONLNdˇˇ)Å ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ...........°dONLNdˇˇ(î» °dONLNdˇˇ(î
  519. 14°dONLNdsóH£(†H*Removing Resources from a Resource Archive°dONLNdˇˇ)à................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`..................°dONLNdˇˇ(† °dONLNdˇˇ)¯15°dONLNd°£HØ∏(¨HDecompressing Resources°dONLNdˇˇ)r ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`................°dONLNdˇˇ(¨∏ °dONLNdˇˇ(¨
  520. 15°dONLNdºØHªƒ(∏HCompressing Font Resources°dONLNdˇˇ)~ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ............°dONLNdˇˇ(∏ƒ °dONLNdˇˇ(∏
  521. 15
  522. °dONLNd⁄Õ6fl)(€6InstaCompOne Atom Extender"°∂ fl4fl+°∂°∂
  523. °dONLNdı‡6ÏÏ*$Using the InstaCompOne Atom Extender°dONLNdˇˇ)∑ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...............................°dONLNdˇˇ(ÈÏ °dONLNdˇˇ(È
  524. 17°dONLNdÏH¯o(ıH>Adding the InstaCompOne Atom Extender to your Installer Script°dONLNdˇˇ(ıq ................................°dONLNdˇˇ)`...................°dONLNdˇˇ(ıo °dONLNdˇˇ)õ17°dONLNd_¯HK(H5How the Atom Extender Locates Data Inside the Archive°dONLNdˇˇ(M ................................°dONLNdˇˇ)`...............................°dONLNdˇˇ(K °dONLNdˇˇ)ø17°dONLNdòHÁ(
  525. H Debugging Decompression Problems°dONLNdˇˇ)ü ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.°dONLNdˇˇ(
  526. Á °dONLNdˇˇ(
  527. 
  528. 18
  529. °dONLNdº"64g(06"InstaCompOne ScriptCheck Extension"°∂ 444+°∂°∂
  530. °dONLNdfl56A*,Using the InstaCompOne ScriptCheck Extension°dONLNdˇˇ)€ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...................°dONLNdˇˇ(> °dONLNdˇˇ)˚19
  531. °dONLNdS6eÛ(a6FileAndRsrcSplitterTool"°∂ e4e+°∂°∂
  532. °dONLNd'f6r◊*!About the FileAndRsrcSplitterTool°dONLNdˇˇ)¢ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`......°dONLNdˇˇ(o◊ °dONLNdˇˇ(o
  533. 20°dONLNdLr6~({6,Using the FileAndRsrcSplitterTool with Files°dONLNdˇˇ)“ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`......................°dONLNdˇˇ({ °dONLNdˇˇ({
  534. 20°dONLNd|~Häã(áH Command Line°dONLNdˇˇ)E ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...............................°dONLNdˇˇ(áã °dONLNdˇˇ(á
  535. 20°dONLNdåäHñ÷(ìH Tool Options for Splitting Files°dONLNdˇˇ)ê ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`......°dONLNdˇˇ(ì÷ °dONLNdˇˇ(ì
  536. 20°dONLNd∞ñH¢ã(üHSplitting Files°dONLNdˇˇ)E ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...............................°dONLNdˇˇ(üã °dONLNdˇˇ(ü
  537. 21°dONLNd√¢HÆ¥(´HCompressing Split Files°dONLNdˇˇ)l ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`..................°dONLNdˇˇ(´¥ °dONLNdˇˇ(´
  538. 22°dONLNdfiÆ6∫(∑60Using the FileAndRsrcSplitterTool with Resources°dONLNdˇˇ)Á ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...............°dONLNdˇˇ(∑ °dONLNdˇˇ)Ó22°dONLNd∫HΔã(√H Command Line°dONLNdˇˇ)E ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`...............................°dONLNdˇˇ(√ã °dONLNdˇˇ(√
  539. 22°dONLNd"ΔH“Í(œH$Tool Options for Splitting Resources°dONLNdˇˇ)¢ ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ(œÍ °dONLNdˇˇ(œ
  540. 22°dONLNdJ“Hfiü(€HSplitting Resources°dONLNdˇˇ)W ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.........................°dONLNdˇˇ(€ü °dONLNdˇˇ(€
  541. 23ˇÑdˇ ˇˇˇˇd
  542. _, Palatino
  543. .+~-Table of Contents,     Helvetica
  544.     (Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )¶3
  545. °dONLNdQH]»(ZHCompressing Split Resources°dONLNdˇˇ)Å ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ...........°dONLNdˇˇ(Z» °dONLNdˇˇ(Z
  546. 23°dONLNd]Hi%(fH0Joining Split and Compressed Files and Resources°dONLNdˇˇ)fi ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ............°dONLNdˇˇ(f% °dONLNdˇˇ)Â24°dONLNdSi6uë(r6Splitting Strategies°dONLNdˇˇ)] ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)` ................................°dONLNdˇˇ)`.............................°dONLNdˇˇ(rë °dONLNdˇˇ(r
  547. 24ˇ
  548. Ddˇ ˇˇˇˇd
  549. _, Palatino
  550. .+~-C  H  A  P  T  E  R      1,     Helvetica
  551.     (Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )¶4
  552. $°dONLNdQ~y(o~Overview"°∂ 4+°∂°∂
  553. °dONLNd    ~**∏TThis chapter provides an overview of the InstaCompOne suite of tools used for adding°dONLNd^*~6Ö* ;compression/decompression support to Installer 4.0 scripts.
  554. °dONLNdöN6bÉ(]6Overview"°∂ b4b+°∂°∂
  555. °dONLNd£g~sÙ+HPThe InstaCompOne SDK allows developers writing scripts for Apple’s Installer 4.0°dONLNdÙs~* Yapplication to split and compress their source files, fonts and resources, then have them°dONLNdN~ãö* >transparently decompressed and joined during the installation.°dONLNdçì~ü#*TThis document assumes you are familiar with MPW (Macintosh Programmers Workshop) and°dONLNd‚ü~´)* `have experience writing Installer 4.0 scripts.  See the document “Installer 4.0 Technical Guide”°dONLNdC´~∑à* >for detailed information on writing scripts for Installer 4.0.
  556. °dONLNdÇÀ~⁄∑*"Features"°∂ Ÿ|Ÿ+°∂°∂
  557. °dONLNdãfi~ÍÏ*OThe InstaCompOne Installer 4.0 Compression Kit includes the following features:,
  558.  
  559. Zapf Dingbats
  560.     °dONLNd€Ù~˝Ö*n
  561. °dONLNd›Úê˛+)!Competitive compression savings. °dONLNd˛Ú+˛‚)õ' Average savings range from 40% to 60%.
  562.     °dONLNd&~Ö(~n
  563. °dONLNd(êq)3Decompression is fast and transparent to the user. °dONLNd[q#)·' Decompression is performed entirely in°dONLNdÉê!(êYmemory while the data is read from the source file, freeing the user from any wait at the°dONLNd›ê*˘* end of the installation.
  564.     °dONLNdˆ4~=Ö(;~n
  565. °dONLNd¯2ê>t)3Fonts and other resources can be easily compressed.°dONLNd+2t>)‰$  This allows for additional savings°dONLNdP>êJ(GêYwith very low scripting overhead.  In many cases it only takes an additional reference to°dONLNd™JêV* Nthe InstaCompOne Atom Extender (ID 241) from a Resource or Font Atom to enable°dONLNd˘Vêb‘* decompression.
  566.     °dONLNd    l~uÖ(s~n
  567. °dONLNd jêv¶)?Compresses multiple files and resources into a single archive. °dONLNdJj¶v (s¶ This saves disk space,°dONLNdbvêÇ"(ê]while enabling the scriptwriter to reduce the source files to one file per installation disk.
  568.     °dONLNd¿å~ïÖ(ì~n
  569. °dONLNd¬äêñu)6Split files, fonts, and resources before compression. °dONLNd¯äuñ )Â# This allows efficient use of space°dONLNdñê¢(üêVwithin the installation disk set, reducing the need for adding additional installation°dONLNds¢êÆ!* Xdisks simply because a compressed file would not fit completely onto the remaining space°dONLNdÃÆê∫* [on an installation disk. This feature also allows files that are too large to be compressed°dONLNd(∫êΔ∞* Conto a single installation disk to be included in the installation.ˇ†dˇ ˇˇˇˇd
  570. _, Palatino
  571. .+~*C  H  A  P  T  E  R      1,     Helvetica
  572.     *Overview(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°5
  573. °dONLNdQ~`÷(\~ SDK Contents"°∂ _|_+°∂°∂
  574. °dONLNd
  575. d~p*YThis SDK contains all the necessary files and resources you’ll need to compress files and°dONLNdgp~|* Yresources and create an Installer script that automatically decompresses your data during°dONLNd¡|~à∏*
  576. installation.,
  577.  
  578. Zapf Dingbats
  579.     °dONLNdœí~õÖ*n
  580. °dONLNd—êêú)VInstaCompOne 1.0 Technical Guide - A guide for creating Installer scripts that use the°dONLNd(úê®M* &InstaCompOne compression.  (DocViewer)
  581.     °dONLNdO≤~ªÖ(π~n
  582. °dONLNdQ∞꺠   )MInstaCompOneTool- A MPW tool for compressing, decompressing and managing your°dONLNdüºê» *
  583. archive file.
  584.     °dONLNd≠“~€Ö(Ÿ~n
  585. °dONLNdØ–ê‹ )UFileAndRsrcSplitterTool - A MPW tool for splitting files, fonts, and resources before°dONLNd‹êË=* &compressing these items into archives.
  586.     °dONLNd,Ú~˚Ö(˘~n
  587. °dONLNd.ê¸$)[InstaCompOneAtomExt.rsrc - A file containing resources to include in your Installer script.
  588.     °dONLNdä~Ö(
  589. ~n
  590. °dONLNdåê
  591. )SInstaCompOneSCExt.rsrc - A file containing resources to include in your ScriptCheck°dONLNd‡ê–* extension file.
  592.     °dONLNd&~/Ö(-~n
  593. °dONLNdÚ$ê0)RExamples -  Each example contains everything needed to build the example installer°dONLNdE0ê<* Xscript. Our examples use a makefile to perform all compression and splitting, to rez the°dONLNdû<êH÷* Kinstaller script source file, and to run ScriptCheck on the example script.°dONLNdÎP¢\+QInstaCompOneExample - This example is described in the next section in detail. It°dONLNd=\¢hÛ* Ndemonstrates the installation of a file, and installation of a font, using the°dONLNdåh¢t * InstaCompOne compression.°dONLNd¶|¢à*RFile Example - This example demonstrates the installation of a file by use of file°dONLNd˘à¢î+* compression and file splitting.°dONLNdú¢®#*UResource Example - This example demonstrates the installation of a resource by use of°dONLNdo®¢¥d* ,resource compression and resource splitting.°dONLNdúº¢»$*VFont Example - This example demonstrates the installation of a font by use of resource°dONLNdÛ»¢‘>* #compression and resource splitting.
  594. °dONLNdÏ6≥(˚6Example Script"°∂ 4+°∂°∂
  595. °dONLNd&~+H]This example describes the process of creating a very simple Installer document that installs°dONLNdÑ~* Zand decompresses one application file (SimpleText) and a family of fonts (Helvetica).  All°dONLNdfl~)* _necessary files required to create a working version of this script are available in the folder°dONLNd?)~5
  596. * Q“InstaCompOneExample” in the InstaCompOne SDK.  The process of building a working°dONLNdë5~A* ZInstaller script requires three mains tasks:  compressing source files and fonts using the°dONLNdÏA~M"* YInstaCompOne MPW tool, creating and compiling the script file using the Rez MPW tool, and°dONLNdFM~Yì* ;running the ScriptCheck MPW tool on the Installer document.°dONLNdÇa~m*RThe commands shown in the discussion below are executed automatically by the Build°dONLNd’m~y⁄* Mcommand.  These build commands can be seen in the file “Makefile”.  Refer to °dONLNd    "m⁄y
  597. (v⁄    Macintosh°dONLNd    ,y~Ö((Ç~"Programmers Workshop 3.0 Reference°dONLNd    Ny(Ö)™/ for more information about using the MPW Shell°dONLNd    ~Ö~ë(é~application and the Rez tool.
  598. °dONLNd    ù•~¥i*"%Compressing the source file and fonts"°∂ ≥|≥+°∂°∂
  599. °dONLNd    √∏~ƒ$*^Apple’s SimpleText application is used in this example.  Assuming the current directory is set°dONLNd
  600. "ƒ~–* Wto the example folder, we compress the SimpleText application into an InstaCompOne file°dONLNd
  601. z–~‹¸* archive with the command:ˇºdˇ ˇˇˇˇd
  602. _, Palatino
  603. .+~*C  H  A  P  T  E  R      1,     Helvetica
  604.     *Overview(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°6,
  605. Courier°dONLNdQ6\](Y6;InstaCompOneTool SimpleText -o ":Tidbits:Installation Data"
  606. °dONLNd<i~u"+H\After the compression has finished, listing the contents of the archive shows the SimpleText°dONLNdôu~Å
  607. * !application as its only contents.
  608.     °dONLNdªÖ6êl(ç6>InstaCompOneTool SimpleText -o ":Tidbits:Installation Data" -l°dONLNd˙è6ö˝*
  609. [ID  File Name                       Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd°dONLNdVô6§˝*
  610. [———————————————————————————————————————————————————————————————————————————————————————————°dONLNd≤£6Ư*
  611. Z  3 SimpleText                      APPL  ttxt        0        0   0    76168    33924  56
  612. °dONLNd
  613. º~»≠+HENotice that there is nothing in the data fork, and therefore is zero.°dONLNdU‰~!*(_Next, we must compress our font resources.  Each of the eight font resources will be compressed°dONLNdµ~¸ˇ* Rseparately and stored as individual items within an InstaCompOne resource archive.°dONLNd
  614. ~Å*7We compress the eight font resources with the commands:
  615.     °dONLNdB6⁄(6TInstaCompOneTool Helvetica -k sfnt=16033 -a part=200 -o ":Tidbits:Installation Data"°dONLNdó6)’*
  616. SInstaCompOneTool Helvetica -k sfnt=5336 -a part=201 -o ":Tidbits:Installation Data"°dONLNdÎ(63⁄*
  617. TInstaCompOneTool Helvetica -k NFNT=24110 -a part=202 -o ":Tidbits:Installation Data"°dONLNd@26=⁄*
  618. TInstaCompOneTool Helvetica -k NFNT=22271 -a part=203 -o ":Tidbits:Installation Data"°dONLNdï<6G⁄*
  619. TInstaCompOneTool Helvetica -k NFNT=14739 -a part=204 -o ":Tidbits:Installation Data"°dONLNdÍF6Q⁄*
  620. TInstaCompOneTool Helvetica -k NFNT=15203 -a part=205 -o ":Tidbits:Installation Data"°dONLNd?P6[⁄*
  621. TInstaCompOneTool Helvetica -k NFNT=17245 -a part=206 -o ":Tidbits:Installation Data"°dONLNdîZ6e⁄*
  622. TInstaCompOneTool Helvetica -k NFNT=17892 -a part=207 -o ":Tidbits:Installation Data"
  623. °dONLNdÈr~~"+H`After each font resource has been compressed into its resource archive, we can list the contents°dONLNdJ~~ä˛* of several of these archives.
  624.     °dONLNdié6ôÈ(ñ6WInstaCompOneTool Helvetica -k sfnt=16033 -a part=200 -o ":Tidbits:Installation Data" -l°dONLNd¡ò6£î*
  625. F    Type     ID  Name                            Org Size Cmp Size Svd°dONLNd    ¢6≠î*
  626. F——————————————————————————————————————————————————————————————————————°dONLNdP¨6∑î*
  627. F  3 sfnt   16033 Helvetica                          52812    39290  26°dONLNdó¿6ÀÈ*WInstaCompOneTool Helvetica -k NFNT=24110 -a part=202 -o ":Tidbits:Installation Data" -l°dONLNdÔ 6’î*
  628. F    Type     ID  Name                            Org Size Cmp Size Svd°dONLNd7‘6flî*
  629. F——————————————————————————————————————————————————————————————————————°dONLNd~fi6Èî*
  630. F  3 NFNT   24110                                     2694     1746  36
  631. °dONLNd≈ˆ~ +HaFinally, we add the ‘FOND’ resource to the source file.  It’s best to convert the resource to the°dONLNd    '~Ù* type ‘iFND’, then use the °dONLNd    AÙN)vencodedFONDRsrc°dONLNd    PN!)Z1 flag in the Font Atom to signal to the Installer°dONLNd    Ç~ (~Ythat the source ‘FOND’ has been encoded.  We use the following command to encode and copy°dONLNd    ‹~&* Wthe ‘FOND’ resource from the file “Helvetica” into the source file “Installation Data”:
  632.     °dONLNd
  633. 4*65S(269FONDEncoderTool Helvetica -o ":Tidbits:Installation Data"
  634. °dONLNd
  635. nB~Np+H6Now we’re ready to begin writing the Installer script.
  636. °dONLNd
  637. •b~q*"Writing the Installer script"°∂ p|p+°∂°∂
  638. °dONLNd
  639. ¬u~Å*ZWe begin writing our Installer script by including the InstaCompOne Atom Extender resource°dONLNd Å~ç”* by adding the line °dONLNd 0Å”çΩ)U'include "InstaCompOneAtomExt.rsrc" NOT °dONLNd WÅΩç¿)Í'°dONLNd XÅ¿çÿ)vers°dONLNd \Åÿç€)'°dONLNd ]Å€ç·);°dONLNd ^Å·ç!)
  640.  somewhere in°dONLNd lç~ô%(ñ~`our script file.  The script resources are created normally with the following important points:,
  641.  
  642. Zapf Dingbats
  643.     °dONLNd Õ£~¨Ö*n
  644. °dONLNd œ°ê≠)XWe must use format 1 versions or higher of the File Atom (‘infa’) and Font Atom (‘inff’)°dONLNd (≠êπ* Vresources because these versions allow us to specify the Atom Extender ID number.  The°dONLNd πê≈ * \number 241 tells Installer 4.0 to look for the Atom Extender resource (‘inex’) with this ID.ˇ@dˇ ˇˇˇˇd
  645. _, Palatino
  646. .+~*C  H  A  P  T  E  R      1,     Helvetica
  647.     *Overview(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°7,
  648.  
  649. Zapf Dingbats
  650. °dONLNdS~\Ö(Z~n
  651. °dONLNdQê])YSize, Finder attributes, and resource attribute fields are left as zero.  The ScriptCheck°dONLNd\]êiE* )MPW tool will fill these fields in later.
  652.     °dONLNdÜs~|Ö(z~n
  653. °dONLNdàqê}&)YWhen decompressing font resources, we must provide the Installer with the source resource°dONLNd‚}êâˇ* Ttype and ID.  This requires us to specify each strike (size and style) individually.°dONLNd7âêï    * QInstaCompOne compressed resources should always use the resource type ‘part’. The°dONLNdâïê°* Wresource ID ( or part number ) can be any number between 128 and 32000, and should be a°dONLNd·°ê≠i* 0unique part number assigned by the scriptwriter.°dONLNdµ~¡#(æ~\The Installer script Rez file “InstaCompOneExample.r” is shown below in its entirety. Please°dONLNdo¡~Õ* ]note that, for sake of simplicity in demonstrating compression, this example uses old style (°dONLNdÕÕ~Ÿ * ]pre-4.0 installer ) method for creating Custom Install packages. This example is not intended°dONLNd+Ÿ~ÂÕ* Kas an example of how to take advantage of 4.0 Installer interface features.,
  654. Courier
  655.     °dONLNdwÈ6ÙΩ(Ò6#include "InstallerTypes.r"°dONLNdìÛ6˛*
  656. .include "InstaCompOneAtomExt.rsrc" NOT 'vers';°dONLNd¬6–*R/*************************** Package resources **********************************/°dONLNd6≥*
  657. resource 'inpk' (20037) {°dONLNd0H&u+
  658.     format0 {°dONLNd<%Z0†+
  659. showsOnCustom,°dONLNdK%¥0m)Z%notRemovable, dontForceRestart, 0, 0,°dONLNds/Z:(7Z'"SimpleText File Decompession Example",°dONLNdù9ZD™*
  660. { 'infa', 1001 }°dONLNdØCHNM(KH}°dONLNd±M6X@(U6};°dONLNd¥a6l≥*resource 'inpk' (20038) {°dONLNdœkHvu+
  661.     format0 {°dONLNd€uZÄ^+
  662. 4showsOnCustom, notRemovable, dontForceRestart, 0, 0,°dONLNdZä*
  663. &"Helvetica Font Decompession Example",°dONLNd;âZî™*
  664. { 'inff', 1001 }°dONLNdMìHûM(õH}°dONLNdOù6®@(•6};°dONLNdR±6ºÀ*Q/*************************** SimpleText File Atom ******************************/°dONLNd§ª6ΔÆ*
  665. resource 'infa' (1001) {°dONLNdæ≈H–u+
  666.     format1 {°dONLNd œZ⁄≥+
  667. EdeleteWhenRemoving, deleteWhenInstalling, copy, dontIgnoreLockedFile,°dONLNdŸZ‰Ã*
  668. JdontSetFileLocked, useVersProcToCompare, srcNeedExist, rsrcForkInDataFork,°dONLNd_„ZÓ«*
  669. IleaveAloneIfNewer, updateExisting, copyIfNewOrUpdate, rsrcFork, dataFork,°dONLNd´ÌZ¯d*
  670. 0,°dONLNd≤Ì¥¯©)Z1/* Total size will be filled in by ScriptCheck */°dONLNdʘZd(ˇZ0,°dONLNd̘¥Ã)Z8/* Finder attributes will be filled in by ScriptCheck */°dONLNd(Z x(    Z10000,°dONLNd1 Z_*
  671. {°dONLNd3 l≤)20000, 0, 0 },°dONLNdB Δ¢)Z,/* sizes will be filled in by ScriptCheck */°dONLNdqZ n(Z0x0,°dONLNdxZ*d*
  672. 0,°dONLNd})Z4n*
  673. 241,°dONLNdÑ3Z>d*
  674. ""°dONLNdà=HHM(EH}°dONLNdäG6R@(O6};°dONLNdç[6f–*R/*********************** Example Helvetica Font Atom ****************************/°dONLNd‡e6pÆ*
  675. resource 'inff' (1001) {°dONLNd˙oHzu+
  676.     format2 {°dONLNdyZÑÂ+
  677. OdeleteWhenRemoving, deleteWhenInstalling, copy, encodedFONDRsrc, noTgtRequired,°dONLNdXÉZé∏*
  678. FupdateExisting, copyIfNewOrUpdate, dontIgnoreProtection, srcNeedExist,°dONLNd°çZòÕ*
  679. byID, nameNeedNotMatch,°dONLNdªóZ¢x*
  680. 10002,°dONLNd√óê¢Ã)6 /* Target */°dONLNd“°Z¨x(©Z20000,°dONLNd⁄°ê¨Ã)6 /* Source */°dONLNdÈ´Z∂i(≥Z32,°dONLNdÔ´¢∂ )H/* FOND Attributes */°dONLNd    µZ¿d(ΩZ0,°dONLNd     µê¿{)6//* Total font size, filled in by ScriptCheck */°dONLNd    >øZ i(«Z21,°dONLNd    Dø¢ „)H
  681. /* FOND ID */°dONLNd    T…Z‘“(—ZexplicitFamilyMembers {{ˇàdˇ ˇˇˇˇd
  682. _, Palatino
  683. .+~*C  H  A  P  T  E  R      1,     Helvetica
  684.     *Overview(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°8,
  685. Courier°dONLNdQl\ (YlF 0, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdJ[Hfe(cH9noUnderlineStyle, noItalicStyle, noBoldStyle, 'sfnt', 32,°dONLNdàe~p+6
  686. { 20000, 'part', 200, 0, "" },°dONLNd™olz (wlF 0, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdÙyHÑ$(ÅH,noUnderlineStyle, noItalicStyle, boldStyle, °dONLNd!y2Ñi)Í 'sfnt', 32,°dONLNd1É~é(ã~{ 20000, 'part', 201, 0, "" },°dONLNdSçlò (ïlF 9, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdùóH¢e(üH9noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,°dONLNd€°~¨+6
  687. { 20000, 'part', 202, 0, "" },°dONLNd˝´l∂ (≥lF10, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdGµH¿e(ΩH9noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,°dONLNdÖø~ +6
  688. { 20000, 'part', 203, 0, "" },°dONLNdß…l‘ (—lF12, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdÒ”Hfie(€H9noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,°dONLNd/›~Ë+6
  689. { 20000, 'part', 204, 0, "" },°dONLNdQÁlÚ (ÔlF14, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdõÒH¸e(˘H9noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,°dONLNdŸ˚~+6
  690. { 20000, 'part', 205, 0, "" },°dONLNd˚l (
  691. lF18, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdEHe(H9noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,°dONLNdÉ~$+6
  692. { 20000, 'part', 206, 0, "" },°dONLNd•#l. (+lF24, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, °dONLNdÔ-H8e(5H9noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,°dONLNd-7~B+6
  693. { 20000, 'part', 207, 0, "" }°dONLNdMAZLi(IZ}},°dONLNdSKZVn*
  694. 241,°dONLNdZUZ`i*
  695. "",°dONLNd`_Zjë*
  696. "Helvetica"°dONLNdmiHtM(qH}°dONLNdos6~@({6};°dONLNdrá6í–*R/********************** SimpleText Target File Spec. ****************************/°dONLNd≈ë6ú≥*
  697. resource 'intf' (10000) {°dONLNd‡õH¶u+
  698.     format0 {°dONLNdÏ•Z∞m+
  699. 7noSearchForFile, typeCrNeedNotMatch, 'APPL', 'ttxt', 0,°dONLNd&ØZ∫“*
  700. "folder-user:SimpleText"°dONLNd@πHƒM(¡H}°dONLNdB√6Œ@(À6};°dONLNdE◊6‚–*R/********************* Font Suitcase Target File Spec. **************************/°dONLNdò·6Ï≥*
  701. resource 'intf' (10002) {°dONLNd≥ÎHˆu+
  702.     format0 {°dONLNdøıZm+
  703. 7noSearchForFile, typeCrNeedNotMatch, 'FFIL', 'DMOV', 0,°dONLNd˘ˇZ
  704. ·*
  705. "folder-user:Example Fonts"°dONLNd    HM(H}°dONLNd6@(6};°dONLNd'62–*R/************************* Archive Source File Spec. ****************************/°dONLNdn16<≥*
  706. resource 'infs' (20000) {°dONLNdâ;HFV+
  707. 6'ircp', 'kakc', 0x1, noSearchForFile, TypeCrMustMatch,°dONLNd¡EHPœ*
  708. "Tidbits:Installation Data"°dONLNd›O6Z@(W6};°dONLNd‡c6n–*R/************************** Preference Resource *********************************/°dONLNd3m6x©*
  709. resource 'inpr' (300) {°dONLNdLwHÇu+
  710.     format0 {°dONLNdXÅZå÷+
  711. LuseFolderTargetMode, dontAllowUserToSetSystemDisk, showSelectedSizeInCustom,°dONLNdßãZñ÷*
  712. LnoSetupFunctionSupplied, dontAllowCleanInstall, dontAllowServerAsTarget,0,0,°dONLNd˜ïl†q+
  713. {°dONLNd˘ï~†K))301, 311, 301, 311, 302, 312, 302, 312 },°dONLNd    %üZ™™(ßZ"Example Folder"°dONLNd    7©H¥M(±H}°dONLNd    9≥6æ@(ª6};
  714. °dONLNd    <À~◊+HQWe compile the Rez code using the Rez MPW tool by executing the following commandˇ
  715. Pdˇ ˇˇˇˇd
  716. _, Palatino
  717. .+~*C  H  A  P  T  E  R      1,     Helvetica
  718.     *Overview(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°9,
  719. Courier°dONLNdQ6\ä(Y6DRez InstaCompOneExample.r -o InstaCompOneExample -t 'kajr' -c 'kajr'
  720. °dONLNdE_~k'+H[After compiling the Rez code with the Rez MPW tool, we will have an Installer document, but°dONLNd°k~wù* Ait still needs to have the file and resource information updated.
  721. °dONLNd„ã~ö"*"Finishing with ScriptCheck"°∂ ô|ô+°∂°∂
  722. °dONLNd˛û~™À*GThe ScriptCheck MPW tool performs two important actions on your script:,
  723.  
  724. Zapf Dingbats
  725.     °dONLNdF¥~ΩÖ*n
  726. °dONLNdH≤êæ)ZChecks for syntax errors, such as referencing a script resource that is not present in the°dONLNd£æê * [Installer document.  The ScriptCheck tool also verifies that all source files and resources°dONLNdˇ ê÷˛* exist on the source disks.
  727.     °dONLNd‡~ÈÖ(Á~n
  728. °dONLNdfiêÍ)[Fills in the size, Finder attributes, and resource attribute fields we left as zero when we°dONLNdxÍêˆ* Twrote the script.  The ScriptCheck MPW tool gets this information by asking the code°dONLNdÕˆêV* ,contained in the ScriptCheck extension file.°dONLNd˙
  729. ~t(~5To begin the checking process we execute the command:
  730.     °dONLNd06%("6*ScriptCheck 'InstaCompOneExample' -h -d -a
  731. °dONLNd[(~4+HXThe ScriptCheck MPW tool is described in detail in the document “ScriptCheck 4.0 Guide”.
  732. °dONLNd∂H~W©*",Using ScriptCheck with InstaCompOne Archives"°∂ V|V+°∂°∂
  733. °dONLNd„[~g*\To assist ScriptCheck in determining file and resource information of items contained within°dONLNd@g~s* UInstaCompOne archives, an extension file has been provided for ScriptCheck. This file°dONLNdñs~ * Wenables ScriptCheck to determine size and attribute information about the original item°dONLNdÓ~ãG* )contained within an InstaCompOne archive.°dONLNdì~ü*ZThe file “InstaCompOneSCExt.rsrc” contains code that can retrieve the required information°dONLNdsü~´)* `from the archive to enable ScriptCheck to correctly update the Installer document.  This file is°dONLNd‘´~∑"* !included in the InstaCompOne SDK.°dONLNd¯ø~Àê*:To enable ScriptCheck for use with InstaCompOne archives :
  734.     °dONLNd3’~fiÖ*n
  735. °dONLNd5”êfl)VPlace a copy of the file “InstaCompOneSCExt.rsrc” in the same folder as your Installer°dONLNdåflêÎP* /script source file ( myInstallScript.r, etc. ).
  736.     °dONLNdºı~˛Ö(¸~n
  737. °dONLNdæÛêˇ )VRename the file so that it has the same name as the install script source but uses the°dONLNdˇê •* >filename extension of “.scx”.  Example : “myInstallScript.scx”°dONLNdT~(~TWhen running ScriptCheck to build the installer for InstaCompOneExample, ScriptCheck°dONLNd©~+'* Ylooks for a file named “InstaCompOneExample.scx” which was created in our automated build°dONLNd+~7°* process.ˇ
  738. Üdˇ ˇˇˇˇd
  739. _, Palatino
  740. .+~-C  H  A  P  T  E  R      2,     Helvetica
  741.     (Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°10
  742. $°dONLNdQ~y((o~InstaCompOne MPW Tool"°∂ 4+°∂°∂
  743. °dONLNd~*p*∏1This chapter describes the InstaCompOne MPW Tool.
  744. °dONLNdHB6V(Q6About InstaCompOneTool"°∂ V4V+°∂°∂
  745. °dONLNd_[~g+HTYou’ll use the InstaCompOne MPW Tool named “InstaCompOneTool” to compress your files°dONLNd¥g~s* Yand resources into an archive.  The InstaCompOne MPW Tool also allows you to list, remove°dONLNds~Ñ* ;and decompress files or resources contained in the archive.°dONLNdJá~ì*YThe actual compressed data is stored differently depending on whether you are compressing°dONLNd§ì~üÀ* files or resources:,
  746.  
  747. Zapf Dingbats
  748.     °dONLNd∏©~≤Ö*n
  749. °dONLNd∫ßê≥‡)NFor files:  the compressed data is stored in the data fork of an archive file.
  750.     °dONLNd    Ω~ΔÖ(ƒ~n
  751. °dONLNd ªê«%)]For resources and fonts:  the compressed data is stored in a archive resource usually of type°dONLNdi«ê”* Z'part'.  These archive resources can be placed in any file, including an archive file that°dONLNdƒ”êfl^* /contains compressed file data in its data fork.°dONLNdÙÁ~Û(~WYou'll use the InstaCompOneTool to compress and manage both archived files and archived°dONLNdLÛ~ˇ* \resources.  The rest of this chapter is divided in two sections:  using the InstaCompOneTool°dONLNd©ˇ~ ’* Iwith file archives and using the InstaCompOneTool with resource archives.°dONLNdÛ~#*YThe InstaCompOne MPW Tool requires MPW 3.0 or newer and System 7.0 or newer.  To list the°dONLNdM~+R* .help text, invoke the tool without parameters.
  752. °dONLNd}C6Wƒ(R6-Using the InstaCompOneTool with File Archives"°∂ W4W+°∂°∂
  753. °dONLNd´\~h"+HZThis section describes how to use InstaCompOneTool to compress and manage compressed files°dONLNdh~tÈ* stored in a file archive.
  754. °dONLNd!à~ófi*" Command Line"°∂ ñ|ñ+°∂°∂
  755. °dONLNd.õ~ßS*/Usage when compressing files in a file archive:,
  756. Courier°dONLNd^´~∑‡*;InstaCompOneTool filename -o archiveFilename [-e] [-f name]°dONLNdõ≈~—ƒ*HUsage when decompressing, listing or removing files from a file archive:ˇÿdˇ ˇˇˇˇd
  757. _, Palatino
  758. .+~*C  H  A  P  T  E  R      2,     Helvetica
  759.     *InstaCompOne MPW Tool(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )ú11,
  760. Courier
  761. °dONLNdQ~]¯(Z~?InstaCompOneTool [-d|-l|-r] filename [-i ID] -o archiveFilename
  762. °dONLNdAl~{5*Tool Options for File Archives"°∂ z|z+°∂°∂
  763. °dONLNd`~ã“* fileName ...°dONLNdmã&)ê>When compressing, specifies one or more files to be compressed°dONLNd¨ãó* 5and added to the archive file.  When decompressing or°dONLNd‚ó£&* Aremoving, specifies one or more file entries in the file archive.°dONLNd%£Ø* :If more than one entry exists in the archive with the same°dONLNd`ت)* @filename, you may need to use the -i option to specify the exact°dONLNd°ª«'* @entry.  The filename can be a single file name, partial path, or°dONLNd‚«”;*
  764. full path.°dONLNdÔ€~Á¸(‰~-o archiveFileName°dONLNd€Á)ê<Specifies a filename, partial path, or full path to a new or°dONLNd?ÁÛn* existing file archive.°dONLNdV˚~ƒ(~
  765. -i entryID°dONLNda˚)ê:Specifies a compressed file entry in the archive using the°dONLNdú* ?file’s unique identifier, instead of the name.  This option can°dONLNd‹* ;only be used when removing or decompressing a file entry in°dONLNd+* 9the archive and can be mixed with filenames.  You can use°dONLNdR+7¬* (multiple -i options in one command line.°dONLNd{?~Kå(H~-r°dONLNd~?K)ê<Requests that the specified compressed files be deleted from°dONLNdªKW* <the file archive indicated by the -o option.  The compressed°dONLNd¯Wc%* Afiles can either be specified by filename or using the -i option.°dONLNd:k~wå(t~-d°dONLNd=kw))ê>Requests that the specified compressed file be decompressed to°dONLNd|wÉ* =a file from the file archive specified in the -o option.  The°dONLNd∫Éè* <decompressed file is placed at the location specified in the°dONLNd˜èõ* <file name path.  An existing file with the same name will be°dONLNd4õßá* replaced without warning.°dONLNdNØ~ªå(∏~-l°dONLNdQت')êAWrites a listing of the files contained in the archive to stdout.°dONLNd˙* 5The -l option should only be used with the -o option.°dONLNd œ~€å(ÿ~-e°dONLNdÕœ€)ê5Requests that the data fork being compressed from the°dONLNd€Á!* @specified source files actually be stored in the file archive as°dONLNdDÁÛ* <coming from the resource fork.  This option is required when°dONLNdÅÛˇ
  766. * 9compressing a resource fork that has been split using the°dONLNdªˇ %* <FileAndRsrcSplitterTool, because this tool always places the°dONLNd¯ * :split resource data into the data fork of the split files.°dONLNd3~+‡((~-f newFilename°dONLNdB+ )ê=Renames the source file being compressed to that specified in°dONLNdÄ+7* 8newFilename.  Since the InstaCompOne Atom Extender finds°dONLNdπ7C* <the file in the file archive based partly on the target file°dONLNdˆCO* :name, this eliminates the need to rename split files using°dONLNd1O[æ* %MPW or the Finder before compressing.
  767. °dONLNdWo~~Û(z~Compressing Files"°∂ }|}+°∂°∂
  768. °dONLNdiÇ~é*]You can add one or more files to a new or existing archive file by specifying the files to be°dONLNd«é~ö* ^compressed and the archive filename.  If the specified archive file does not exist, it will be°dONLNd    &ö~¶#* bcreated.  The tool will not create folders that do not exist.  If a file exists with the same name°dONLNd    â¶~≤#* bas the specified archive name, but the file is not a valid archive, an error is written to stderr.°dONLNd    Ï≤~æ* _If the folders or directories specified in the path to a non-existing archive do not exist, the°dONLNd
  769. Læ~ Ë* Vfolders or directories will not be created, and an error is will be written to stderr.ˇædˇ ˇˇˇˇd
  770. _, Palatino
  771. .+~*C  H  A  P  T  E  R      2,     Helvetica
  772.     *InstaCompOne MPW Tool(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )ú12
  773. °dONLNdQ~]'(Z~[For example, to compress the files MyBigFile and “A Large File” and add them to the archive°dONLNd\]~iO* +file “Compressed Data” execute the command:,
  774. Courier
  775.     °dONLNdàm6x£(u6IInstaCompOneTool  MyBigFile "Hard Disk:A Large File" -o "Compressed Data"
  776. °dONLNd“{~á&+HaIf an entry for the file you are compressing and adding to the archive already exists, it will be°dONLNd4á~ì* _replaced.  The tool uses the name, type and creator to determine if the file is the same as one°dONLNdîì~ü)* _already in the archive.  Each time you add or update a file in the archive a new ID is assigned°dONLNdÙü~´˛* to the compressed file entry.
  777.     °dONLNdµ~¿ö*NOTE
  778. °dONLNd√~œ    *WThe suggested MPW Shell partition size is at least 4 Mb’s.  Compressing large files may°dONLNdoœ~€)* )require an even larger partition size.   ,
  779.  
  780. Zapf Dingbats
  781.     °dONLNdò—)⁄0)´u
  782. °dONLNdöÔ~˛(˙~Viewing a File Archive"°∂ ˝|˝+°∂°∂
  783. °dONLNd±~É*<You view the contents of a file archive using the -l option.°dONLNdÔ~"Ô*SFor example, to list the information about the compressed files in the file archive°dONLNdC"~.<* &“Compressed Data” execute the command:
  784.     °dONLNdj26=(:6*InstaCompOneTool   -o "Compressed Data" -l
  785. °dONLNdï@~L
  786. +H!The listing is written to stdout.
  787.     °dONLNd∑P6[’(X6SID  File Name               Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd°dONLNd Z6e’*
  788. S———————————————————————————————————————————————————————————————————————————————————°dONLNd_d6o–*
  789. R  7 General Controls        cdev  misc        0        0   0    58658    20700  65°dONLNd≤n6y–*
  790. R  9 Labels                  cdev  flbs        0        0   0     2922      915  69°dONLNdx6É–*
  791. R 12 Mouse                   cdev  mous        0        0   0    18339    15015  19°dONLNdXÇ6ç–*
  792. R 20 Views                   cdev  fvew        0        0   0     2921      841  72°dONLNd´å6ó’*
  793. S———————————————————————————————————————————————————————————————————————————————————°dONLNdˇñ6°–*
  794. R            TOTALS                            0        0   0    82840    37471  45
  795. °dONLNdR∞~øV+H"Removing Files from a File Archive"°∂ æ|æ+°∂°∂
  796. °dONLNdu√~œ*\Compressed files can easily be removed from an archive file by using the -r option.  Specify°dONLNd“œ~€(* bthe files by listing their filenames in the command, or use the -i option to refer to a compressed°dONLNd5€~Á&* _file using its unique identifier.  This may be necessary when several compressed files have the°dONLNdïÁ~Û"* [same name, otherwise the first file found in the archive matching the name will be removed.°dONLNdÒ˚~l*4For example, let’s assume we start with the archive:
  797.     °dONLNd& 6’(6SID  File Name               Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd°dONLNdz6 ’*
  798. S———————————————————————————————————————————————————————————————————————————————————°dONLNdŒ6*–*
  799. R  1 LaserWriter             PRER  LWRW        0        0   0   268960   169589  37°dONLNd    !)64–*
  800. R  2 LaserWriter 300         PRER  LWL2        0        0   0   318151   144917  55°dONLNd    t36>–*
  801. R  3 LW Select 310           PRES  lwsl        0        0   0   268973   171945  37°dONLNd    «=6H–*
  802. R  4 Personal LaserWriter SC PRER  LWSC        0        0   0    72716    37332  49°dONLNd
  803. G6R–*
  804. R  5 StyleWriter II          PRER  IJR2        0        0   0   301358   137184  55°dONLNd
  805. mQ6\–*
  806. R  6 LaserWriter             TEXT  ????    11311     3793  67      571      336  42°dONLNd
  807. ¿[6f–*
  808. R  7 LaserWriter II NT       TEXT  ????    11830     3600  70      571      346  40°dONLNd e6p–*
  809. R  8 LaserWriter II NTX      TEXT  ????    11957     3679  70      571      346  40°dONLNd fo6z–*
  810. R  9 LaserWriter Pro 810f    TEXT  ????    29434     6207  79      571      414  28°dONLNd πy6Ñ–*
  811. R 10 LaserWriter Select 360  TEXT  ????    20738     5269  75      573      396  31°dONLNd É6é’*
  812. S———————————————————————————————————————————————————————————————————————————————————°dONLNd `ç6ò–*
  813. R            TOTALS                        85270    22548  74  1233015   662805  47
  814. °dONLNd ≥õ~ß˚+HRTo remove the StyleWriter II and LaserWriter files from the archive we execute the°dONLNd
  815. ß~≥´* command:
  816.     °dONLNd
  817. ∑6¬v(ø6@InstaCompOneTool  "StyleWriter II" -i 6  -o "Compressed Data" -r
  818. °dONLNd
  819. P≈~—#+H]Since the name LaserWriter shows twice, we used the option -i 6 to specify the exact entry we°dONLNd
  820. Æ—~›¬* wish to delete.ˇídˇ ˇˇˇˇd
  821. _, Palatino
  822. .+~*C  H  A  P  T  E  R      2,     Helvetica
  823.     *InstaCompOne MPW Tool(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )ú13
  824. °dONLNdQ~]ì(Z~;After the remove operation is complete we have the archive:,
  825. Courier
  826.     °dONLNd<a6l’(i6SID  File Name               Type  Crtr   DF Org   DF Cmp  Svd  RF Org   RF Cmp  Svd°dONLNdêk6v’*
  827. S———————————————————————————————————————————————————————————————————————————————————°dONLNd‰u6Ä–*
  828. R  1 LaserWriter             PRER  LWRW        0        0   0   268960   169589  37°dONLNd76ä–*
  829. R  2 LaserWriter 300         PRER  LWL2        0        0   0   318151   144917  55°dONLNdäâ6î–*
  830. R  3 LW Select 310           PRES  lwsl        0        0   0   268973   171945  37°dONLNd›ì6û–*
  831. R  4 Personal LaserWriter SC PRER  LWSC        0        0   0    72716    37332  49°dONLNd0ù6®–*
  832. R  7 LaserWriter II NT       TEXT  ????    11830     3600  70      571      346  40°dONLNdÉß6≤–*
  833. R  8 LaserWriter II NTX      TEXT  ????    11957     3679  70      571      346  40°dONLNd÷±6º–*
  834. R  9 LaserWriter Pro 810f    TEXT  ????    29434     6207  79      571      414  28°dONLNd)ª6Δ–*
  835. R 10 LaserWriter Select 360  TEXT  ????    20738     5269  75      573      396  31°dONLNd|≈6–’*
  836. S———————————————————————————————————————————————————————————————————————————————————°dONLNd–œ6⁄–*
  837. R            TOTALS                        73959    18755  75   931086   525285  44
  838. °dONLNd#È~¯+HDecompressing Files"°∂ ˜|˜+°∂°∂
  839. °dONLNd7¸~%*^You’ll normally use the Atom Extender that you've included in your Installer script to perform°dONLNdñ~"* _the decompression during the installation, but the tool can also be used to decompress any file°dONLNdˆ~ ˘* contained in a file archive.°dONLNd(~4*_To decompress a file, use the -d option and specify one or more filenames or file entries using°dONLNdt4~@•* Bthe -i option.  Files that are decompressed remain in the archive.°dONLNd∑H~T"*aIf you do not specify a file to be decompressed, all files will be decompressed.  The tool places°dONLNdT~`)* ^the decompressed files into the current directory and will replace any file with the same name°dONLNdx`~lfi* without notification.°dONLNdêt~Ä*WFor example, to decompress the files MyBigFile and “A Large File” from the archive file°dONLNdËÄ~å<* &“Compressed Data” execute the command:
  840.     °dONLNdê6õ≤(ò6LInstaCompOneTool  MyBigFile "Hard Disk:A Large File" -o "Compressed Data" -d
  841. °dONLNd\Æ6¬Û*%1Using the InstaCompOneTool with Resource Archives"°∂ ¬4¬+°∂°∂
  842. °dONLNdé«~”+HXThis section describes how to use the InstaCompOneTool to compress and manage compressed°dONLNdÁ”~fl:* +resource data stored in a resource archive.
  843. °dONLNdÛ~fi*" Command Line"°∂ |+°∂°∂
  844. °dONLNd!~Í*PUsage when compressing and adding or replacing a resource in a resource archive:°dONLNdr~"Ï*=InstaCompOneTool filename -o archiveFilename -k restype=ID -a°dONLNd∞!~-∫*
  845. restype=ID°dONLNdª;~GÓ*QUsage when decompressing, listing or removing a resource from a resource archive:°dONLNd    
  846. K~W*CInstaCompOneTool [-d|-l|-r] filename -o archiveFilename [-i ID] [-k°dONLNd    QV~b* restype=ID] -a restype=ID
  847. °dONLNd    lq~Ä[*"Tool Options for Resource Archives"°∂ |+°∂°∂
  848. °dONLNd    èÑ~ê∂*fileName°dONLNd    òÑê)ê6When compressing, specifies the file that contains the°dONLNd    œêú* ;resources to be compressed, or when decompressing, the file°dONLNd
  849. ú®* =that the original resources will be placed.  The filename can°dONLNd
  850. I®¥Á* 2be a single file name, partial path, or full path.°dONLNd
  851. ~º~»Ÿ(≈~
  852. -k restype=ID°dONLNd
  853. 庻
  854. )ê9Specifies the type and ID of a resource to be compressed,°dONLNd
  855. Δ»‘)* >decompressed or removed.  For example, if the resource has theˇ¯dˇ ˇˇˇˇd
  856. _, Palatino
  857. .+~*C  H  A  P  T  E  R      2,     Helvetica
  858.     *InstaCompOne MPW Tool(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )ú14
  859. °dONLNdQ](Z9type 'sfnt' and the ID 5302, then the parameter should be°dONLNd:]i}* formatted:  -k sfnt=5302.,
  860. Courier°dONLNdUq~}¸(z~-o archiveFileName°dONLNdhq})ê<Specifies a filename, partial path, or full path to a new or°dONLNd•}â‰* 1existing file that contains the archive resource.°dONLNd◊ë~ùŸ(ö~
  861. -a restype=ID°dONLNdÂëùÓ)ê2Specifies the type and ID of the archive resource.°dONLNd•~±ƒ(Æ~
  862. -i entryID°dONLNd#•±    )ê8Specifies a compressed resource in the archive using the°dONLNd\±Ω * ?entry’s unique identifier, instead of the resource type and ID.°dONLNdùΩ…(* =This option can only be used when removing or decompressing a°dONLNd€…’Ì* 2compressed resource entry in the archive resource.°dONLNd›~Èå(Ê~-r°dONLNd›È)ê;Requests that the specified compressed resources be deleted°dONLNdMÈı"* >from the archive identified by the -o and -a options.  Specify°dONLNdåı* 9the resources to be removed by using the -k or -i option.°dONLNdΔ    ~å(~-d°dONLNd…    ı)ê3Requests that the specified compressed resources be°dONLNd˝!'* >decompressed to a file.  The decompressed resources are placed°dONLNd<!-* ;in the filename found in the command.  An existing resource°dONLNdx-9%* ;with the same type and ID will be replaced without warning.°dONLNd¥A~Må(J~-l°dONLNd∑AM)ê;Writes a listing of the resources contained in the resource°dONLNdÛMY^* archive to stdout.
  863. °dONLNdm~|(x~Compressing Resources"°∂ {|{+°∂°∂
  864. °dONLNdÄ~å*YCompressing resources into a resource archive is similar to compressing files, except the°dONLNdvå~ò* [archive is actually contained in a resource you choose.  You’ll need to specify the archive°dONLNd“ò~§
  865. * Zresource type and ID using the -a option.  You must also specify the name of the file that°dONLNd-§~∞}* <contains, or will contain this resource using the -o option.°dONLNdj∏~ƒ*_Multiple resources (except font resources) can be placed into one resource archive, and will be°dONLNd ƒ~–* Xfound automatically by the Atom Extender and decompressed during installation.  Both the°dONLNd#–~‹&* \MPW Tool and the Atom Extender use the original type and ID to find the resource data in the°dONLNdÄ‹~Ë•* archive.°dONLNdâ~¸(*`For example, to compress the resource (type ‘fred’ and ID 128) found in the file “FredRsrcs” and°dONLNd͸~!* ^place it into an archive resource of type ‘part’ and ID 300 in the file “Compressed Fred Data”°dONLNdI~‡* execute the command:
  866.     °dONLNd^6#∑( 6MInstaCompOneTool  FredRsrcs -k fred=128 -a part=300 -o "Compressed Fred Data"
  867. °dONLNd¨1~=+H\Each time you add or update a resource in the archive a new ID is assigned to the compressed°dONLNd    =~Iø* resource entry.
  868. °dONLNd]~l,*"Viewing a Resource Archive"°∂ k|k+°∂°∂
  869. °dONLNd4p~|*ZYou can view the compressed resources currently contained in resource archive using the -l°dONLNdè|~àû* option.°dONLNdòê~ú*]To list information about the compressed resource in the archive resource (type ‘part’ and ID°dONLNdˆú~®É* 8200 ) in the file “Compressed Data” execute the command:
  870.     °dONLNd    /¨6∑?(¥65InstaCompOneTool  -a part=200 -o "Compressed Data" -l
  871. °dONLNd    e∫~Δ
  872. +H!The listing is written to stdout.
  873.     °dONLNd    à 6’î(“6F    Type     ID  Name                            Org Size Cmp Size Svd°dONLNd    –‘6flî*
  874. F——————————————————————————————————————————————————————————————————————ˇ^dˇ ˇˇˇˇd
  875. _, Palatino
  876. .+~*C  H  A  P  T  E  R      2,     Helvetica
  877.     *InstaCompOne MPW Tool(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )ú15,
  878. Courier°dONLNdQ6\î(Y6F  1 sfnt    5336 Helvetica Bold                     51624    38356  26
  879. °dONLNdGk~z¢+H*Removing Resources from a Resource Archive"°∂ y|y+°∂°∂
  880. °dONLNdr~~äˇ*UTo remove a resource entry from an archive specify these four options in the command:,
  881.  
  882. Zapf Dingbats
  883.     °dONLNd»î~ùÖ*n
  884. °dONLNd íêûv)5-r option, to signify that this is a remove operation
  885.     °dONLNd®~±Ö(Ø~n
  886. °dONLNd¶ê≤Õ)G-o option with the filename of the file containing the resource archive
  887.     °dONLNdJº~≈Ö(√~n
  888. °dONLNdL∫êΔh)/-a option with the resource archive type and ID
  889.     °dONLNd|–~ŸÖ(◊~n
  890. °dONLNd~Œê⁄Ÿ)H-k option with the original, uncompressed resource type and ID to remove°dONLNd«‚~Ó&(Î~`For example, to remove the resource ‘fred’ ID 245 from the resource archive ‘part’ ID 128 in the°dONLNd(Ó~˙b* 0file “Compressed Resources” execute the command:
  891.     °dONLNdY˛6    (6_InstaCompOneTool  "Hard Disk:My Resources" -k fred=245 -a part=128 -o "Compressed Resources" -r
  892. °dONLNdπ~'(+HDecompressing Resources"°∂ &|&+°∂°∂
  893. °dONLNd—+~7Æ*CTo decompress a resource specify these five options in the command:
  894.     °dONLNdA~JÖ*n
  895. °dONLNd?êKò)<-d option, to signify that this is a decompression operation
  896.     °dONLNdTU~^Ö(\~n
  897. °dONLNdVSê_Õ)G-o option with the filename of the file containing the resource archive
  898.     °dONLNdûi~rÖ(p~n
  899. °dONLNd†gêsh)/-a option with the resource archive type and ID
  900.     °dONLNd–}~ÜÖ(Ñ~n
  901. °dONLNd“{êáÎ)L-k option with the original, uncompressed resource type and ID to decompress
  902.     °dONLNdë~öÖ(ò~n
  903. °dONLNd!èêõˆ)O-filename or pathname of the file in which the original resource will be placed°dONLNdq£~Ø(¨~\For example, to decompress the resource ‘fred’ ID 245 to the file “My Resources” on the disk°dONLNdŒØ~ª* V“Hard Disk” from the resource archive ‘part’ ID 128 in the file “Compressed Resources”°dONLNd%ª~«‡* execute the command:
  904.     °dONLNd:À6÷(”6_InstaCompOneTool  "Hard Disk:My Resources" -k fred=245 -a part=128 -o "Compressed Resources" -d
  905. °dONLNdöÂ~Ù9+HCompressing Font Resources"°∂ Û|Û+°∂°∂
  906. °dONLNdµ¯~*\Compressing font resources is very similar to compressing any other resource, except several°dONLNd~(* ^limitations must be kept in mind.  There are four common font resource types:  ‘FOND’, ‘FONT’,°dONLNdq~(* \‘NFNT’ and ‘sfnt’.  The ‘FOND’ resource describes how the other types relate, and the ‘FONT’°dONLNdŒ~("* _is an older type that is rarely used today.  Therefore, the most common font resources you will°dONLNd.(~4V* 1compress will either be of type ‘NFNT’ or ‘sfnt’.
  907.     °dONLNd`>~Iö*NOTE
  908. °dONLNdeL~X≤*CKeep these important notes in mind when compressing font resources:
  909.     °dONLNd©b~kÖ*n
  910. °dONLNd´`êl)XMultiple font resources cannot be placed into a single resource archive ; therefore, one°dONLNdlêx * Zresource archive must be created for each original font resource.  Although, any number of°dONLNd_xêÑ'* `resource archives can be placed into a single source file, even into a file that contains a file°dONLNd¿Ñêê˙* archive in its data fork
  911.     °dONLNdŸö~£Ö(°~n
  912. °dONLNd€òê§ )VThe ‘FOND’ resource should never be compressed or split.  It’s also best to encode the°dONLNd    2§ê∞
  913. * R‘FOND’ resource as type ‘iFND’ whenever it’s ‘NFNT’, ‘sfnt’ or ‘FONT’ resource are°dONLNd    Ö∞꺧* >compressed.  An example of this encoding is described below.  
  914.     °dONLNd    √≤§ª´(π§uˇÑdˇ ˇˇˇˇd
  915. _, Palatino
  916. .+~*C  H  A  P  T  E  R      2,     Helvetica
  917.     *InstaCompOne MPW Tool(Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )ú16
  918. °dONLNdQ~](Z~]For example, to compress the resource (type ‘sfnt’ and ID 5336) found in the file “Helvetica”°dONLNd^]~i* ]and place it into an archive resource of type ‘part’ and ID 200 in the file “Compressed Data”°dONLNdºi~u‡* execute the command:,
  919. Courier
  920.     °dONLNd—y6Ñ£(Å6IInstaCompOneTool  Helvetica -k sfnt=5336 -a part=200 -o "Compressed Data"
  921. °dONLNdí~û+H]The Installer will be expect to the ‘FOND’ resource located in the file you have specified in°dONLNdyû~™* [your ‘inff’ script resource.  You can use the FONDEncoderTool or Rez commands to encode and°dONLNd’™~∂)* ^copy the ‘FOND’ resources.  To encode the ‘FOND’ resource and store it in the file “Compressed°dONLNd4∂~¬ˇ* Data” execute the command:
  922.     °dONLNdOœ6⁄(◊6.FONDEncoderTool Helvetica -o "Compressed Data"
  923. °dONLNd~›~Èá+Hor
  924.     °dONLNdÅÌ6¯∑(ı6Mecho "include Helvetica 'FOND' AS 'iFND';" | Rez -o "Compressed Data" -append
  925. °dONLNdœ~'+H^The ‘FOND’ resource will be stored as a resource of type ‘iFND’ with the identical resource ID°dONLNd.~*  as the original ‘FOND’ resource.
  926.     °dONLNdO3~>ö*!NOTE
  927. °dONLNdT=~I* ]The ‘FOND’ encoding is only a feature of format version 2 of the Font Atom.  Make sure to use°dONLNd≤I~Uê* the °dONLNd∂IêUÍ)encodedFONDRsrc°dONLNd≈IÍU)Z@ flag to signal to the Installer that the source ‘FOND’ has been°dONLNdU~a©(^~
  928. encoded.  ,
  929.  
  930. Zapf Dingbats
  931.     °dONLNdW©`∞)+uˇ <dˇ ˇˇˇˇd
  932. _, Palatino
  933. .+~-C  H  A  P  T  E  R      3,     Helvetica
  934.     (Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°17
  935. $°dONLNdQ~y◊(o~InstaCompOne Atom°dONLNdy~°*(Extender"°∂ A4A+°∂°∂
  936. °dONLNdF~RÉ*∏6This chapter describes the InstaCompOne Atom Extender.
  937. °dONLNdRj6~å(y6$Using the InstaCompOne Atom Extender"°∂ ~4~+°∂°∂
  938. °dONLNdwÉ~è+HZThe InstaCompOne Atom Extender is two resources you add to your Installer script file that°dONLNd“è~õ$* awill be called at the appropriate time to decompress ( and optionally to join split pieces of ) a°dONLNd4õ~ß* [File, Resource or Font Atom’s data during the installation.  This Atom Extender can only be°dONLNdêß~≥û* ;used with archives created using the InstaCompOne MPW Tool.
  939. °dONLNdë~÷*">Adding the InstaCompOne Atom Extender to your Installer Script"°∂ ’|’+°∂°∂
  940. °dONLNd ⁄~Ê≥*BThe InstaCompOne Atom Extender resources are contained in the file°dONLNdNÊ~Ú* \“InstaCompOneAtomExt.rsrc”.  You’ll need to place these resources into your Installer script°dONLNd´Ú~˛* `file so the Installer can find it.  If you are using MPW to create your Installer script, simply°dONLNd ˛~
  941. ±* Iinclude the following line in your Installer script Rez file (“.r” file):,
  942. Courier°dONLNdV~í*.include "InstaCompOneAtomExt.rsrc" NOT 'vers';°dONLNdÖ~)!*ZFor those File, Resource and Font Atoms that are copying data contained in an InstaCompOne°dONLNd‡)~5)* `archive, place the number 241 in the Atom Extender ID field of the atom resource.  This field is°dONLNdA5~A* aonly available in format 1 or higher versions of the ‘infa’ , ‘inra’ and ‘inff’ script resources.
  943.     °dONLNd£K~Vö*NOTE
  944. °dONLNd®Y~e'*'For File Atoms, you’ll need to use the °dONLNdœY'eì)©rsrcForkInDataFork°dONLNd·Yìe)l flag to enable the Atom°dONLNd˙e~q!(n~`Extender to access the archive correctly when copying the resource fork of a compressed file.   ,
  945.  
  946. Zapf Dingbats
  947.     °dONLNdZg!p((n!u
  948. °dONLNd\Ö~îŸ(ê~5How the Atom Extender Locates Data Inside the Archive"°∂ ì|ì+°∂°∂
  949. °dONLNdíò~§*ZThe InstaCompOne Atom Extender uses different criteria to locate a file or resource in the°dONLNḑ~∞Z* ,archive than does the InstaCompOne MPW tool.°dONLNd∏~ƒ*WThe Atom Extender uses the following strategy for find the correct data in the archive:ˇDdˇ ˇˇˇˇd
  950. _, Palatino
  951. .+~*C  H  A  P  T  E  R      3
  952. *InstaCompOne Atom Extender,     Helvetica
  953.     (Ô~Installer 4.0 Technical Guide(ÔÉ )ú18,
  954.  
  955. Zapf Dingbats
  956. °dONLNdS~\Ö(Z~n
  957. °dONLNdQê]$)ZFor files, the Atom Extender uses only the filename and the original, uncompressed size of°dONLNd]]êi* Xthe data.  The filename will be extracted from the target path in the 'intf' target spec°dONLNd∂iêu+* &resource for the file atom ( 'infa' ).
  958.     °dONLNdfi~àÖ(Ü~n
  959. °dONLNd‡}êâ)[For font resources, only the target type of the resource is used.  This limitation prevents°dONLNd<âêï˘* Rmultiple compressed font resources from being stored in a single resource archive.
  960.     °dONLNdèü~®Ö(¶~n
  961. °dONLNdëùê©!)\For non-font resources, both the target type and target ID are used to find the entry inside°dONLNdÓ©êµÔ* the resource archive.°dONLNdΩ~…(Δ~WMost of the time you’ll never have to worry about how the data is found in the archive,°dONLNd\…~’‹* because it just works!
  962.     °dONLNdsfl~Íö*NOTE
  963. °dONLNdxÌ~˘%*\You may notice some degradation of decompression speed from floppy disks if a single archive°dONLNd’˘~* \contains more than 30 files.  This will be addressed in a future version of the InstaCompOne°dONLNd2~ * Atom Extender.   
  964.     °dONLNdC —)Lu
  965. °dONLNdE%~4h(0~ Debugging Decompression Problems"°∂ 3|3+°∂°∂
  966. °dONLNdf8~D"*]If something goes wrong during decompression, the Installer will cancel the installation with°dONLNdƒD~P$* aa generic error message.  During your testing cycle, it’s easiest to determine the actual problem°dONLNd&P~\* Xusing the Installer Debugger supplied with the Installer 4.0 SDK.  The InstaCompOne Atom°dONLNd\~hÔ* PExtender will write any error information to the Installer Debugger main window.°dONLNd—p~|;*'InstaCompOne Atom Extender error codes:°dONLNd˘Ñ~ê∂* Error# 28201°dONLNdÑê$)ê?The file archive or resource archive may be corrupted or is not°dONLNdFêú* <a valid archive.  The Atom Extender looks for a signature in°dONLNdÉú® * ?the header of the archive, and if not found returns this error.°dONLNd√®¥ * >If the signature is correct but the checksum of the header and°dONLNd¥¿"* >catalog is incorrect the archive is assumed corrupted and this°dONLNdA¿Ã`* error is generated.°dONLNdW‘~‡∂(›~ Error# 28202°dONLNdd‘‡$)ê?The compressed file or resource was not found in the catalog of°dONLNd§‡Ï* >the archive.  This is most often because the compressed file’s°dONLNd„ϯ* ;filename is incorrect in the archive when using with a File°dONLNd¯&* ;Atom.  See the above section “How the Atom Extender Locates°dONLNd[* :Data Inside the Archive” for information about our catalog°dONLNdñX* lookup strategy.°dONLNdß$~0∂(-~ Error# 28203°dONLNd¥$0)ê:The checksum of the data that has been read does not match°dONLNdÔ0<¸* 4the value stored in the archive.  The archive may be°dONLNd$<H<*
  967. corrupted.°dONLNd2P~\∂(Y~ Error# 28204°dONLNd?P\)ê7This version of the InstaCompOne Atom Extender does not°dONLNdw\h%* ?support the archive version.  This might be the case if you are°dONLNd∑ht"* ;using an older Atom Extender with an archive created with a°dONLNdÛtÄ≥* %newer version of the compressor tool.ˇ
  968. ædˇ ˇˇˇˇd
  969. _, Palatino
  970. .+~-C  H  A  P  T  E  R     4,     Helvetica
  971.     (Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°19
  972. $°dONLNdQ~yr(o~ InstaCompOne°dONLNd
  973. y~°Â*(ScriptCheck Extension"°∂ A4A+°∂°∂
  974. °dONLNd#F~R¶*∏>This chapter describes the InstaCompOne ScriptCheck Extension.°dONLNdbZ~f(*_In order to have ScriptCheck compute the correct target size values and fill in the appropriate°dONLNd¬f~r* [Finder flags and version number for a compressed file, ScriptCheck must know how to extract°dONLNdr~~.* 'this information from the archive file.
  975. °dONLNdHñ6™…(•6,Using the InstaCompOne ScriptCheck Extension"°∂ ™4™+°∂°∂
  976. °dONLNduØ~ªê+H:To enable ScriptCheck for use with InstaCompOne archives :,
  977.  
  978. Zapf Dingbats
  979.     °dONLNd∞≈~ŒÖ*n
  980. °dONLNd≤√êœ)VPlace a copy of the file “InstaCompOneSCExt.rsrc” in the same folder as your installer°dONLNd    œê€=* *script source ( myInstallScript.r, etc. ).
  981.     °dONLNd4Â~ÓÖ(Ï~n
  982. °dONLNd6„êÔ )VRename the file so that it has the same name as the install script source but uses the°dONLNdçÔê˚•* >filename extension of “.scx”.  Example : “myInstallScript.scx”
  983.     °dONLNdÃ~ö(
  984. ~NOTE
  985. °dONLNd—~*WYou must use version 4.0.1 or newer of the ScriptCheck tool when using the InstaCompOne°dONLNd)~+Ì* ScriptCheck Extension.   
  986.     °dONLNdB!Ì*Ù)ou
  987. °dONLNdD3~?((<~ZWhen checking a File, Resource or Font Atom which references an Atom Extender, ScriptCheck°dONLNdü?~K* 7looks for a file named “yourScriptFileName.scx”, where °dONLNd÷?Kfi(HyourScriptFileName°dONLNdË?fiK)_ is the same as°dONLNd¯K~W(T~]the Installer Script file name you are checking.  To create the ScriptCheck Extension for the°dONLNdVW~cŸ* IInstaCompOne compressor, just rename the file “InstaCompOneSCExt.rsrc” to°dONLNd†c~o(* `“yourScriptFileName.scx”.  Place this file in the same directory as the Installer script you are°dONLNdo~{©*     checking.°dONLNd É~è#*[See the document “ScriptCheck 4.0 Guide” for the gory details of how ScriptCheck extensions°dONLNdgè~õò* work.°dONLNdm£~Ø*[See the section “InstaCompOne Atom Extender” in this document for a listing of the possible°dONLNd…Ø~ª™* @error code returned from the InstaCompOne ScriptCheck extension.ˇ
  988.  dˇ ˇˇˇˇd
  989. _, Palatino
  990. .+~-C  H  A  P  T  E  R      5,     Helvetica
  991.     (Ô~ InstaCompOne 1.0 Technical Guide(ÔÉ )°20
  992. $°dONLNdQ~yˇ(o~FileAndRsrcSplitterTool"°∂ 4+°∂°∂
  993. °dONLNd~*m*∏3This chapter describes the FileAndRsrcSplitterTool.
  994. °dONLNdLB6VS(Q6!About the FileAndRsrcSplitterTool"°∂ V4V+°∂°∂
  995. °dONLNdn[~g(+H]You’ll use the MPW Tool named “FileAndRsrcSplitterTool” to split large files and resources to°dONLNdÃg~s* \enable floppy disk sets to be created, or to optimize the disk space usage.  Additional disk°dONLNd)s~ * Vspace savings are possible when the split pieces are compressed using the InstaCompOne°dONLNdÄ~ãœ* compression tools.°dONLNdìì~ü*\The FileAndRsrcSplitterTool can split either files or individual resources.  The rest of the°dONLNdü~´–* Mthis chapter is divided between it use with files and its use with resources.
  996.     °dONLNd>µ~¿ö*NOTE
  997. °dONLNdC√~œ*WThe FileAndRsrcSplitter MPW Tool requires MPW 3.0 or newer and System 7.0 or newer.  To°dONLNdõœ~€|* :list the help text, invoke the tool without parameters.   ,
  998.  
  999. Zapf Dingbats
  1000.     °dONLNd’—|⁄É)˛u
  1001. °dONLNd◊Û6¢(6,Using the FileAndRsrcSplitterTool with Files"°∂ 4+°∂°∂
  1002. °dONLNd ~"+HaThis section describes how to split files for use with Installer 4.X.  File Atom format version 1°dONLNdf~$* Zor higher supports multiple spilt sources.  Refer to the Installer 4.X Technical Guide for°dONLNd¡$~0é* >additional information concerning installation of split files.
  1003. °dONLNdD~Sfi*" Command Line"°∂ R|R+°∂°∂,
  1004. Courier
  1005. °dONLNd
  1006. ^~j*DFileAndRsrcSplitterTool filename… -s sizeInBytes [-o outputFilename]
  1007. °dONLNdRy~à8* Tool Options for Splitting Files"°∂ á|á+°∂°∂
  1008. °dONLNdså~ò“* fileName ...°dONLNdÄåò)ê?Specifies one or more files to be split.  The filename can be a°dONLNd¿ò§”* -single file name, partial path, or full path.
  1009.     °dONLNdÔ¨∑**NOTE
  1010. °dONLNdÙ∂¬!* BIf specifying multiple source files to be split, do not use the -o°dONLNd7¬Œ* >option.  This will allow the source filename to be used as the°dONLNdvŒ⁄è*  root name of the split files.   
  1011.     °dONLNdñ–èŸñ)Åuˇñdˇ ˇˇˇˇd
  1012. _, Palatino
  1013. .+~*C  H  A  P  T  E  R      5
  1014. *FileAndRsrcSplitterTool,     Helvetica
  1015.     (‰~ InstaCompOne 1.0 Technical Guide(‰É )°21,
  1016. Courier
  1017. °dONLNdQ~]‡(Z~-s sizeInBytes°dONLNdQ]&)ê>Specifies in bytes the maximum size desired for each resulting°dONLNdN]i™* 'piece of the file or files to be split.°dONLNdvq~}ı(z~-o outputFilename°dONLNdàq})ê=Specifies the root name and the location of the created split°dONLNdΔ}â$* @files.  The filename can be a single file name, partial path, or°dONLNdâï;*
  1018. full path.
  1019.     °dONLNdù®**NOTE
  1020. °dONLNdß≥!* BIf specifying multiple source files to be split, do not use the -o°dONLNd[≥ø* >option.  This will allow the source filename to be used as the°dONLNdöøÀè*  root name of the split files.   ,
  1021.  
  1022. Zapf Dingbats
  1023.     °dONLNd∫¡è ñ)Åu
  1024. °dONLNdΩ”fl)(‹=The split file names are created by appending the appropriate°dONLNd˚flÎ* >suffix to the root filename along with the split number.  If a°dONLNd:Θ* @resource fork is present in the source file, split files will be°dONLNd{˜"* Ccreated with the suffix “.rsrc1”, “.rsrc2”, etc.  If a data fork is°dONLNdø* @present in the source file, split files will be created with the°dONLNd* >suffix “.data1”, “.data2”, etc.  For example, if the specified°dONLNd?'* 9output filename was “splitText” and the original file was°dONLNdy'3 * <split into four pieces, the filenames of the resulting files°dONLNd∂3?(* Amight be “splitText.rsrc1”, “splitText.rsrc2”,  “splitText.rsrc3”°dONLNd¯?Kv* and “splitText.data1”.
  1025. °dONLNd_~n—(j~Splitting Files"°∂ m|m+°∂°∂
  1026. °dONLNdr~~
  1027. *]You can split one or more files into separate pieces by specifying the files to be split, the°dONLNd}~~ä* Zmaximum size in bytes for each split piece, and an optional object filename.  If an object°dONLNdÿä~ñ!* afilename is specified, resulting files containing the split pieces of the original file will have°dONLNd:ñ~¢˝* ]'.rsrc1', '.rsrc2', etc. appended to the specified object filename.  If no object filename is°dONLNdò¢~Æ* cspecified, resulting files will use the filename of the original file with '.rsrc1', '.rsrc2', etc.°dONLNd¸Æ~∫Æ*     appended.°dONLNd¬~Œ*\For example, to split the file "TeachText" into one or more pieces that are all smaller than°dONLNddŒ~⁄ * 32k bytes execute the command:
  1028.     °dONLNdÉfi6Èq(Ê6?FileAndRsrcSplitterTool  TeachText -s 32000 -o "splitTeachText"
  1029. °dONLNd√ˆ~+H[This will generate two files named “splitTeachText.rsrc1” and “splitTeachText.rsrc2”.  If a°dONLNd~#* afile exists with the same name as a file generated by file splitting , it will be replaced by the°dONLNdÅ~* generated file without warning.°dONLNd°"~.*`To instruct the Installer to join your split files into one target files during the installation°dONLNd.~:* cyou’ll need to create an entry in the File Atom’s source list for each split file.  If the original°dONLNdf:~F&* asource file had both a data fork and a resource fork you’ll need to create two File Atoms, one to°dONLNd»F~R* Ycopy the resource fork and another one to copy the data fork.  This is necessary to allow°dONLNd    "R~^%* aScriptCheck to correctly update the sizes.  Since the split resource fork will actually be stored°dONLNd    Ñ^~jq* :in the data fork of the split file you’ll need to use the °dONLNd    æ^qj›)ÛrsrcForkInDataFork°dONLNd    –^›j()l flag in your File°dONLNd    „j~vö(s~Atom.
  1030.     °dONLNd    ÈÄ~ãö*NOTE
  1031. °dONLNd    Óé~ö(*`When splitting multiple files it is necessary to use the default object filename to avoid having°dONLNd
  1032. Oö~¶!* _each set of split files being given the same set of filenames. This is accomplished by omitting°dONLNd
  1033. ض~≤* %the -o option ( object filename ).   
  1034.     °dONLNd
  1035. ‘®±)ïuˇ dˇ ˇˇˇˇd
  1036. _, Palatino
  1037. .+~*C  H  A  P  T  E  R      5
  1038. *FileAndRsrcSplitterTool,     Helvetica
  1039.     (‰~ InstaCompOne 1.0 Technical Guide(‰É )°22
  1040. °dONLNdQ~`(\~Compressing Split Files"°∂ _|_+°∂°∂
  1041. °dONLNdd~p *YSplit files can optionally be compressed using the InstaCompOneTool then decompressed and°dONLNdrp~|8* )joined automatically during installation.°dONLNdúÑ~ê*WThe InstaCompOne decompression Atom Extender treats compressed split file just like any°dONLNdÙê~ú* Xother file, but two important points will make sure your file archive is setup properly.,
  1042.  
  1043. Zapf Dingbats
  1044.     °dONLNdM¶~ØÖ*n
  1045. °dONLNdO§ê∞)TThe name of the file in the file archive must be the same as the target file name as°dONLNd§∞êº* Yspecified in the target file spec.  Since the FileAndRsrcSplitterTool creates split files°dONLNd˛ºê»* Xwith unique names, the -f option will allow you to easily compress each piece and stored°dONLNdW»ê‘    * Pwith the target name.  Because InstaCompOne archives allow only one item in each°dONLNd®‘ê‡* Warchive with the same filename, type and creator, it will also be necessary to compress°dONLNd‡êÏ|* 7each split piece of a file into separate file archives.
  1046.     °dONLNd8ˆ~ˇÖ(˝~n
  1047. °dONLNd:Ùê)RThe InstaCompOneTool maintains information about which compressed data is from the°dONLNdçê * Zresource fork and which is from the data fork.  Since all split file data is stored in the°dONLNdË ê"* Zdata fork of the split files you are compressing, you’ll need to tell the InstaCompOneTool°dONLNdCê$H* )which is actually from the resource fork.°dONLNdm,~8)(5~^For example, to compress the split files "splitTeachText.rsrc1" and "splitTeachText.rsrc2" and°dONLNdÃ8~D* Sadd them to two archive files “Compressed Data1” and “Compressed Data2” execute the°dONLNd D~PØ*     commands:,
  1048. Courier
  1049.     °dONLNd*T6_È(\6WInstaCompOneTool  splitTeachText.rsrc1  -o ":disk 1:Compressed Data1" -f "TeachText" -e°dONLNdÇ^6iÈ*
  1050. WInstaCompOneTool  splitTeachText.rsrc2  -o ":disk 2:Compressed Data2" -f "TeachText" -e
  1051. °dONLNd⁄l~x&+HaIf an entry for the file you are compressing and adding to the archive already exists, it will be°dONLNd<x~Ñ* Yreplaced.  Be careful when compressing split pieces that you specify the intended archive°dONLNdñÑ~ê * acorrectly. Adding two split pieces of the same file to an archive will result in one of the split°dONLNd¯ê~ú[* 2pieces being overwritten by the other split piece.
  1052. °dONLNd+¥6»—(√60Using the FileAndRsrcSplitterTool with Resources"°∂ »4»+°∂°∂
  1053. °dONLNd\Õ~Ÿ+H`This section describes how to split resources for use with Installer 4.X.  Resource Atom or Font°dONLNdΩŸ~Â* \Atom format version 1 or higher supports multiple spilt sources.  Refer to the Installer 4.X°dONLNdÂ~Ò* ^Technical Guide for additional information concerning installation of split resource or fonts.
  1054. °dONLNdy~fi*" Command Line"°∂ |+°∂°∂
  1055. °dONLNdÜ~+˛*@FileAndRsrcSplitterTool filename -k restype=ID -s sizeInBytes -a°dONLNd«*~6&* restype=ID -o outputFilename
  1056. °dONLNdÂE~T^*$Tool Options for Splitting Resources"°∂ S|S+°∂°∂
  1057. °dONLNd     X~dΩ*    fileName °dONLNd    Xd)ê<Specifies the file containing the resource to be split.  The°dONLNd    Rdp#* ?filename can be a single file name, partial path, or full path.°dONLNd    íx~ÑŸ(Å~
  1058. -k restype=ID°dONLNd    †xÑ%)ê>Specifies the resource type and ID within the specified source°dONLNd    flÑêQ* file to be split.°dONLNd    Òò~§‡(°~-s sizeInBytes°dONLNd
  1059. ò§&)ê>Specifies in bytes the maximum size desired for each resulting°dONLNd
  1060. ?§∞õ* "piece of the resource to be split.°dONLNd
  1061. b∏~ƒŸ(¡~
  1062. -a restype=ID°dONLNd
  1063. p∏ƒ)ê9Specifies the resource type and initial resource ID to be°dONLNd
  1064. ™ƒ–$* >assigned to resource items created within the specified output* file.ˇddˇ ˇˇˇˇd
  1065. _, Palatino
  1066. .+~*C  H  A  P  T  E  R      5
  1067. *FileAndRsrcSplitterTool,     Helvetica
  1068.     (‰~ InstaCompOne 1.0 Technical Guide(‰É )°23
  1069. °dONLNdQ](Z:You may use any unique number between 128 and 32000 as the°dONLNd;]i* >base ID for the resulting split resources. For example, if the°dONLNdziu * ?target type and ID given was [ -a 'curs'=128 ] and the resource°dONLNd∫uÅ&* @was split into three pieces, the resulting resource items placed°dONLNd˚Åç* Bin the specified output file would be : 'curs' (128), 'curs'(129),°dONLNd>çôR* and 'curs'(130).°dONLNdP°≠)*AIf you won’t be compressing the split resource pieces, we suggest°dONLNdí≠π&* Ayou use the resource type ‘part’.  If you will be compressing the°dONLNd‘π≈* 9piece using the InstaCompOneTool, then leave the type the°dONLNd≈—ì* same as the original resource.,
  1070. Courier°dONLNd-Ÿ~Âı(‚~-o outputFilename°dONLNd?ŸÂ)ê<Specify the filename of the file that will contain the split°dONLNd|ÂÒ* 9resource pieces.  The filename can be a single file name,°dONLNd∂Ò˝Ü* partial path, or full path.
  1071. °dONLNd“~ ˜(~Splitting Resources"°∂ |+°∂°∂
  1072. °dONLNdÊ$~0%*aYou can split a resource into separate pieces by specifying the file containing the resource item°dONLNdH0~<* `to be split, the resource type and ID of the resource to be split, the maximum size in bytes for°dONLNd©<~H    * Zeach split piece, the object filename that will contain each split resource piece, and the°dONLNdH~Tó* Aresource type and base ID for each of the resulting split pieces.°dONLNdH\~h!*^For example, to split the resource of type 'STR#' ID 129 within the file "TeachText", into one°dONLNdßh~t¿* Gor more pieces that are all smaller than 2k bytes, execute the command:
  1073.     °dONLNdÔx6ÉÛ(Ä6YFileAndRsrcSplitterTool  TeachText -k ‘STR#’=129 -s 2000 -a part=1000 -o "splitResources"
  1074. °dONLNdIê~ú+H[This will generate two resources of type 'part' with IDs of 1000 and 1001 in the file named°dONLNd•ú~®* ^“splitResources”.  If a resource already exists within the specified object file with the same°dONLNd®~¥Ñ* :resource type and ID, it will be replaced without warning.°dONLNd?º~»¯*ZTo instruct the Installer to join your split resources into one target resource during the°dONLNdö»~‘* _installation you’ll need to create an entry in the Resource or Font Atom’s source list for each°dONLNd˙‘~‡◊* split resource piece.
  1075. °dONLNdÙ~7*"Compressing Split Resources"°∂ |+°∂°∂
  1076. °dONLNd,~ *YSplit resources can optionally be compressed using the InstaCompOneTool then decompressed°dONLNdÜ~K* -and joined automatically during installation.°dONLNd¥'~3*[One important point to remember when compressing split resource pieces is that the type and°dONLNd3~? * YID of the resource that is compressed must be the same as the target resource type and ID°dONLNdj?~K* [specified in the Resource Atom.  Although there are several ways to accomplish this task in°dONLNdΔK~W* \your script building process, our examples uses less than obvious MPW trickery to change the°dONLNd    #W~cÜ* ;type and ID of the split resources before compressing them.°dONLNd    _k~w*ZFor example, to compress the split resources created within the file “splitResources” (see°dONLNd    ∫w~É* Vprevious section) and add them to two archive files “Compressed Data1” and “Compressed°dONLNd
  1077. É~è* Data2” execute the commands:
  1078.     °dONLNd
  1079. .ì6ûŒ(õ6Recho "include ∂"splitResources∂" 'part'(1000) AS 'STR#'(9100);" | Rez -o tempFile1°dONLNd
  1080. Åù6®≤*
  1081. LInstaCompOneTool tempFile1 -k 'STR#'=9100 -a part=1000 -o "Compressed Data1"°dONLNd
  1082. œß6≤Œ*
  1083. Recho "include ∂"splitResources∂" 'part'(1001) AS 'STR#'(9100);" | Rez -o tempFile2°dONLNd "±6º≤*
  1084. LInstaCompOneTool tempFile2 -k 'STR#'=9100 -a part=1001 -o "Compressed Data2"ˇ    –dˇ ˇˇˇˇd
  1085. _, Palatino
  1086. .+~*C  H  A  P  T  E  R      5
  1087. *FileAndRsrcSplitterTool,     Helvetica
  1088.     (‰~ InstaCompOne 1.0 Technical Guide(‰É )°24
  1089. °dONLNdQ~`∫(\~0Joining Split and Compressed Files and Resources"°∂ _|_+°∂°∂
  1090. °dONLNd1d~pç*<It is not possible using the InstaCompOneTool to decompress °dONLNdmdçpû(mçand°dONLNdpdûp) join files or resources that°dONLNdép~|¯(y~Whave been split and compressed.  Only the Installer can join split files and resources.
  1091. °dONLNdÊî6®—(£6Splitting Strategies"°∂ ®4®+°∂°∂
  1092. °dONLNd˚≠~π+HZFile and resource splitting is handy for reducing the disk count in install disk sets, and°dONLNdVπ~≈'* dnecessary for including files and resources that are still too large after compression to fit onto a°dONLNdª≈~— * asingle install disk.  Since files must be split before being compressed you may need to use trial°dONLNd—~›* \and error to determine the right split size to obtain compressed files the optimize the disk°dONLNdz›~ȉ* space on your floppies.°dONLNdîÒ~˝$*_Use the following steps to help you split and compress your files to optimize disk space usage:,
  1093.  
  1094. Zapf Dingbats
  1095.     °dONLNdÙ~Ö*n
  1096. °dONLNdˆê)XFirst, compress the entire file using the InstaCompOne compression tool.  Then calculate°dONLNdOê¬* Fthe "best guess" of how to split the file using the following formula:°dONLNdó%ê1Ï*KMaxSplitPieceSize =  DiskSize  * ( OriginalFileSize  / CompressedFileSize )
  1097.     °dONLNd„;~DÖ(B~n
  1098. °dONLNdÂ9êE)SRun the FileAndRsrcSplitter MPW Tool on the large file, using the MaxSplitPieceSize°dONLNd9EêQ* Rcalculated above.  Then compress each split piece using the InstaCompOne MPW Tool.
  1099.     °dONLNdå[~dÖ(b~n
  1100. °dONLNdéYêe)\If any of the split and compressed pieces are still too large to fit onto the install disks,°dONLNdÎeêq#* Zthen repeat the splitting process using a smaller value for the maximum size of each split°dONLNdFqê}æ* file piece.°dONLNdRÖ~ë (é~XWe hope to eliminate this tedious process in a future version of the InstaCompOne tools.ˇ